aboutsummaryrefslogtreecommitdiff
path: root/FrontEnd/src/views/home/index.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'FrontEnd/src/views/home/index.tsx')
-rw-r--r--FrontEnd/src/views/home/index.tsx14
1 files changed, 8 insertions, 6 deletions
diff --git a/FrontEnd/src/views/home/index.tsx b/FrontEnd/src/views/home/index.tsx
index 9533ea5a..d734b2b7 100644
--- a/FrontEnd/src/views/home/index.tsx
+++ b/FrontEnd/src/views/home/index.tsx
@@ -1,8 +1,10 @@
import React from "react";
import { useNavigate } from "react-router-dom";
-import { HttpTimelineInfo } from "@/http/timeline";
-import { getHttpHighlightClient } from "@/http/highlight";
+import { highlightTimelineUsername } from "@/common";
+
+import { Page } from "@/http/common";
+import { getHttpBookmarkClient, TimelineBookmark } from "@/http/bookmark";
import SearchInput from "../common/SearchInput";
import TimelineListView from "./TimelineListView";
@@ -25,14 +27,14 @@ const HomeV2: React.FC = () => {
"loading" | "done" | "error"
>("loading");
const [highlightTimelines, setHighlightTimelines] = React.useState<
- HttpTimelineInfo[] | undefined
+ Page<TimelineBookmark> | undefined
>();
React.useEffect(() => {
if (highlightTimelineState === "loading") {
let subscribe = true;
- void getHttpHighlightClient()
- .list()
+ void getHttpBookmarkClient()
+ .list(highlightTimelineUsername)
.then(
(data) => {
if (subscribe) {
@@ -67,7 +69,7 @@ const HomeV2: React.FC = () => {
<WebsiteIntroduction className="m-2" />
<TimelineListView
headerText={highlightTimelineMessageMap[highlightTimelineState]}
- timelines={highlightTimelines}
+ timelines={highlightTimelines?.items}
/>
</>
);