diff options
author | crupest <crupest@outlook.com> | 2020-06-07 15:15:51 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-06-07 15:15:51 +0800 |
commit | 2f0785b7c8c25f0bad6ac59a7f643f0a55e03b9c (patch) | |
tree | 00d21c81bfde222be2bca69116d7fea8461bfde5 /Timeline/ClientApp/src/timeline/TimelinePageTemplateUI.tsx | |
parent | b25bc9b56a2e4b1df0b039f1bc5bc4dead5335b1 (diff) | |
download | timeline-2f0785b7c8c25f0bad6ac59a7f643f0a55e03b9c.tar.gz timeline-2f0785b7c8c25f0bad6ac59a7f643f0a55e03b9c.tar.bz2 timeline-2f0785b7c8c25f0bad6ac59a7f643f0a55e03b9c.zip |
feat(front): Fix #77 .
Diffstat (limited to 'Timeline/ClientApp/src/timeline/TimelinePageTemplateUI.tsx')
-rw-r--r-- | Timeline/ClientApp/src/timeline/TimelinePageTemplateUI.tsx | 11 |
1 files changed, 9 insertions, 2 deletions
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}
/>
</>
);
|