From d260c3c3fa073d1a9d09b94c5c4749334e26ab9a Mon Sep 17 00:00:00 2001
From: crupest <crupest@outlook.com>
Date: Sun, 10 Apr 2022 19:07:42 +0800
Subject: ...

---
 FrontEnd/src/views/home/TimelineListView.tsx | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

(limited to 'FrontEnd/src/views/home/TimelineListView.tsx')

diff --git a/FrontEnd/src/views/home/TimelineListView.tsx b/FrontEnd/src/views/home/TimelineListView.tsx
index 95c3c367..2f283e1c 100644
--- a/FrontEnd/src/views/home/TimelineListView.tsx
+++ b/FrontEnd/src/views/home/TimelineListView.tsx
@@ -11,14 +11,6 @@ interface TimelineListItemProps {
 }
 
 const TimelineListItem: React.FC<TimelineListItemProps> = ({ timeline }) => {
-  const url = React.useMemo(
-    () =>
-      timeline.name.startsWith("@")
-        ? `/users/${timeline.owner.username}`
-        : `/timelines/${timeline.name}`,
-    [timeline]
-  );
-
   return (
     <div className="home-timeline-list-item home-timeline-list-item-timeline">
       <svg className="home-timeline-list-item-line" viewBox="0 0 120 100">
@@ -34,7 +26,7 @@ const TimelineListItem: React.FC<TimelineListItemProps> = ({ timeline }) => {
           <small className="text-secondary">{timeline.description}</small>
         </div>
       </div>
-      <Link to={url}>
+      <Link to={`${timeline.owner.username}/${timeline.nameV2}`}>
         <i className="icon-button bi-arrow-right ms-3" />
       </Link>
     </div>
@@ -91,7 +83,7 @@ const TimelineListView: React.FC<TimelineListViewProps> = ({
         <h3>{convertI18nText(headerText, t)}</h3>
       </div>
       {timelines != null
-        ? timelines.map((t) => <TimelineListItem key={t.name} timeline={t} />)
+        ? timelines.map((t) => <TimelineListItem key={t.nameV2} timeline={t} />)
         : null}
       <TimelineListArrow />
     </div>
-- 
cgit v1.2.3

