From 2f0785b7c8c25f0bad6ac59a7f643f0a55e03b9c Mon Sep 17 00:00:00 2001
From: crupest <crupest@outlook.com>
Date: Sun, 7 Jun 2020 15:15:51 +0800
Subject: feat(front): Fix #77 .

---
 Timeline/ClientApp/src/timeline/TimelinePageTemplateUI.tsx | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

(limited to 'Timeline/ClientApp/src/timeline/TimelinePageTemplateUI.tsx')

diff --git a/Timeline/ClientApp/src/timeline/TimelinePageTemplateUI.tsx b/Timeline/ClientApp/src/timeline/TimelinePageTemplateUI.tsx
index 22fb1987..3aaafd2b 100644
--- a/Timeline/ClientApp/src/timeline/TimelinePageTemplateUI.tsx
+++ b/Timeline/ClientApp/src/timeline/TimelinePageTemplateUI.tsx
@@ -20,7 +20,10 @@ export interface TimelineCardComponentProps<TTimeline, TManageItems> {
   onHeight?: (height: number) => void;
 }
 
-export interface TimelinePageTemplateUIProps<TTimeline, TManageItems> {
+export interface TimelinePageTemplateUIProps<
+  TTimeline extends { name: string },
+  TManageItems
+> {
   avatarKey?: string | number;
   timeline?: TTimeline;
   posts?: TimelinePostInfoEx[] | 'forbid';
@@ -34,7 +37,10 @@ export interface TimelinePageTemplateUIProps<TTimeline, TManageItems> {
   error?: string;
 }
 
-export default function TimelinePageTemplateUI<TTimeline, TEditItems>(
+export default function TimelinePageTemplateUI<
+  TTimeline extends { name: string },
+  TEditItems
+>(
   props: TimelinePageTemplateUIProps<TTimeline, TEditItems>
 ): React.ReactElement | null {
   const { t } = useTranslation();
@@ -96,6 +102,7 @@ export default function TimelinePageTemplateUI<TTimeline, TEditItems>(
                 <TimelinePostEdit
                   onPost={props.onPost}
                   onHeightChange={onPostEditHeightChange}
+                  timelineName={props.timeline.name}
                 />
               </>
             );
-- 
cgit v1.2.3

