aboutsummaryrefslogtreecommitdiff
path: root/Timeline/ClientApp/src/timeline/TimelinePageTemplateUI.tsx
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-06-07 15:15:51 +0800
committercrupest <crupest@outlook.com>2020-06-07 15:15:51 +0800
commit2f0785b7c8c25f0bad6ac59a7f643f0a55e03b9c (patch)
tree00d21c81bfde222be2bca69116d7fea8461bfde5 /Timeline/ClientApp/src/timeline/TimelinePageTemplateUI.tsx
parentb25bc9b56a2e4b1df0b039f1bc5bc4dead5335b1 (diff)
downloadtimeline-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.tsx11
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}
/>
</>
);