Browse Source

Render empty element when modal is not opened

yohei0125 3 years ago
parent
commit
55ed2f5413
1 changed files with 6 additions and 1 deletions
  1. 6 1
      packages/app/src/components/DescendantsPageListModal.tsx

+ 6 - 1
packages/app/src/components/DescendantsPageListModal.tsx

@@ -44,7 +44,12 @@ export const DescendantsPageListModal = (): JSX.Element => {
       },
       timeline: {
         Icon: TimeLineIcon,
-        Content: () => <PageTimeline />,
+        Content: () => {
+          if (status == null || !status.isOpened) {
+            return <></>;
+          }
+          return <PageTimeline />;
+        },
         i18n: t('Timeline View'),
         index: 1,
         isLinkEnabled: () => !isSharedUser,