diff options
author | crupest <crupest@outlook.com> | 2021-02-13 14:51:28 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-02-13 14:51:28 +0800 |
commit | 1f70c65eb0d20eb070b72d4e67966c1f7b79c02a (patch) | |
tree | 71afeb77fa370e5dfeb5cf0d02685d0bc87bb627 /FrontEnd/src/app/views/search | |
parent | 6159c8fd8e4d9ded22b9d5dd1772b1529a1d513a (diff) | |
download | timeline-1f70c65eb0d20eb070b72d4e67966c1f7b79c02a.tar.gz timeline-1f70c65eb0d20eb070b72d4e67966c1f7b79c02a.tar.bz2 timeline-1f70c65eb0d20eb070b72d4e67966c1f7b79c02a.zip |
...
Diffstat (limited to 'FrontEnd/src/app/views/search')
-rw-r--r-- | FrontEnd/src/app/views/search/index.tsx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/FrontEnd/src/app/views/search/index.tsx b/FrontEnd/src/app/views/search/index.tsx index 41f1e6b6..8401f26c 100644 --- a/FrontEnd/src/app/views/search/index.tsx +++ b/FrontEnd/src/app/views/search/index.tsx @@ -6,15 +6,14 @@ import { Link } from "react-router-dom"; import { HttpNetworkError } from "@/http/common"; import { getHttpSearchClient } from "@/http/search"; - -import { TimelineInfo } from "@/services/timeline"; +import { HttpTimelineInfo } from "@/http/timeline"; import SearchInput from "../common/SearchInput"; import UserAvatar from "../common/user/UserAvatar"; -const TimelineSearchResultItemView: React.FC<{ timeline: TimelineInfo }> = ({ - timeline, -}) => { +const TimelineSearchResultItemView: React.FC<{ + timeline: HttpTimelineInfo; +}> = ({ timeline }) => { const link = timeline.name.startsWith("@") ? `users/${timeline.owner.username}` : `timelines/${timeline.name}`; @@ -51,7 +50,7 @@ const SearchPage: React.FC = () => { const [searchText, setSearchText] = React.useState<string>(""); const [state, setState] = React.useState< - TimelineInfo[] | "init" | "loading" | "network-error" | "error" + HttpTimelineInfo[] | "init" | "loading" | "network-error" | "error" >("init"); const [forceResearchKey, setForceResearchKey] = React.useState<number>(0); |