reiji-h 2 лет назад
Родитель
Сommit
a4ff99df2b

+ 1 - 3
apps/app/src/components/Navbar/GrowiContextualSubNavigation.tsx

@@ -162,12 +162,11 @@ const CreateTemplateMenuItems = (props: CreateTemplateMenuItemsProps): JSX.Eleme
 type GrowiContextualSubNavigationProps = {
 type GrowiContextualSubNavigationProps = {
   currentPage?: IPagePopulatedToShowRevision | null,
   currentPage?: IPagePopulatedToShowRevision | null,
   isLinkSharingDisabled?: boolean,
   isLinkSharingDisabled?: boolean,
-  isCollapse?: boolean,
 };
 };
 
 
 const GrowiContextualSubNavigation = (props: GrowiContextualSubNavigationProps): JSX.Element => {
 const GrowiContextualSubNavigation = (props: GrowiContextualSubNavigationProps): JSX.Element => {
 
 
-  const { currentPage, isCollapse } = props;
+  const { currentPage } = props;
 
 
   const { t } = useTranslation();
   const { t } = useTranslation();
 
 
@@ -309,7 +308,6 @@ const GrowiContextualSubNavigation = (props: GrowiContextualSubNavigationProps):
             onClickRenameMenuItem={renameItemClickedHandler}
             onClickRenameMenuItem={renameItemClickedHandler}
             onClickDeleteMenuItem={deleteItemClickedHandler}
             onClickDeleteMenuItem={deleteItemClickedHandler}
             onClickSwitchContentWidth={switchContentWidthHandler}
             onClickSwitchContentWidth={switchContentWidthHandler}
-            isCollapse={isCollapse}
           />
           />
         )}
         )}
 
 

+ 5 - 11
apps/app/src/pages/[[...path]].page.tsx

@@ -119,14 +119,13 @@ superjson.registerCustom<IPageToShowRevisionWithMeta, IPageToShowRevisionWithMet
 // GrowiContextualSubNavigation for NOT shared page
 // GrowiContextualSubNavigation for NOT shared page
 type GrowiContextualSubNavigationProps = {
 type GrowiContextualSubNavigationProps = {
   isLinkSharingDisabled: boolean,
   isLinkSharingDisabled: boolean,
-  isCollapse: boolean,
 }
 }
 
 
 const GrowiContextualSubNavigation = (props: GrowiContextualSubNavigationProps): JSX.Element => {
 const GrowiContextualSubNavigation = (props: GrowiContextualSubNavigationProps): JSX.Element => {
-  const { isLinkSharingDisabled, isCollapse } = props;
+  const { isLinkSharingDisabled } = props;
   const { data: currentPage } = useSWRxCurrentPage();
   const { data: currentPage } = useSWRxCurrentPage();
   return (
   return (
-    <GrowiContextualSubNavigationSubstance currentPage={currentPage} isLinkSharingDisabled={isLinkSharingDisabled} isCollapse={isCollapse} />
+    <GrowiContextualSubNavigationSubstance currentPage={currentPage} isLinkSharingDisabled={isLinkSharingDisabled} />
   );
   );
 };
 };
 
 
@@ -330,14 +329,9 @@ const Page: NextPageWithLayout<Props> = (props: Props) => {
         <title>{title}</title>
         <title>{title}</title>
       </Head>
       </Head>
       <div className="dynamic-layout-root justify-content-between">
       <div className="dynamic-layout-root justify-content-between">
-        <Sticky>
-          {({ status }: { status: boolean }) => {
-            const isCollapse = status === Sticky.STATUS_FIXED;
-            return (
-              <GrowiContextualSubNavigation isLinkSharingDisabled={props.disableLinkSharing} isCollapse={isCollapse} />
-            );
-          }}
-        </Sticky>
+        <div className="sticky-top">
+          <GrowiContextualSubNavigation isLinkSharingDisabled={props.disableLinkSharing} />
+        </div>
         <DisplaySwitcher
         <DisplaySwitcher
           pageView={(
           pageView={(
             <PageView
             <PageView

+ 8 - 15
apps/app/src/pages/share/[[...path]].page.tsx

@@ -73,14 +73,13 @@ superjson.registerCustom<IShareLinkRelatedPage, string>(
 type GrowiContextualSubNavigationForSharedPageProps = {
 type GrowiContextualSubNavigationForSharedPageProps = {
   page?: IPagePopulatedToShowRevision,
   page?: IPagePopulatedToShowRevision,
   isLinkSharingDisabled: boolean,
   isLinkSharingDisabled: boolean,
-  isCollapse?: boolean,
 }
 }
 
 
 const GrowiContextualSubNavigationForSharedPage = (props: GrowiContextualSubNavigationForSharedPageProps): JSX.Element => {
 const GrowiContextualSubNavigationForSharedPage = (props: GrowiContextualSubNavigationForSharedPageProps): JSX.Element => {
-  const { page, isLinkSharingDisabled, isCollapse } = props;
+  const { page, isLinkSharingDisabled } = props;
 
 
   return (
   return (
-    <GrowiContextualSubNavigationSubstance currentPage={page} isLinkSharingDisabled={isLinkSharingDisabled} isCollapse={isCollapse} />
+    <GrowiContextualSubNavigationSubstance currentPage={page} isLinkSharingDisabled={isLinkSharingDisabled} />
   );
   );
 };
 };
 
 
@@ -123,18 +122,12 @@ const SharedPage: NextPageWithLayout<Props> = (props: Props) => {
 
 
       <div className="dynamic-layout-root justify-content-between">
       <div className="dynamic-layout-root justify-content-between">
 
 
-        <Sticky>
-          {({ status }: { status: boolean }) => {
-            const isCollapse = status === Sticky.STATUS_FIXED;
-            return (
-              <GrowiContextualSubNavigationForSharedPage
-                page={currentPage ?? props.shareLinkRelatedPage}
-                isLinkSharingDisabled={props.disableLinkSharing}
-                isCollapse={isCollapse}
-              />
-            );
-          }}
-        </Sticky>
+        <div className="sticky-top">
+          <GrowiContextualSubNavigationForSharedPage
+            page={currentPage ?? props.shareLinkRelatedPage}
+            isLinkSharingDisabled={props.disableLinkSharing}
+          />
+        </div>
 
 
         <div id="grw-fav-sticky-trigger" className="sticky-top"></div>
         <div id="grw-fav-sticky-trigger" className="sticky-top"></div>