|
@@ -1,10 +1,7 @@
|
|
|
import React, { ReactNode } from 'react';
|
|
import React, { ReactNode } from 'react';
|
|
|
|
|
|
|
|
-import { pagePathUtils } from '@growi/core';
|
|
|
|
|
import dynamic from 'next/dynamic';
|
|
import dynamic from 'next/dynamic';
|
|
|
|
|
|
|
|
-import { useCurrentPathname } from '~/stores/context';
|
|
|
|
|
-
|
|
|
|
|
import { GrowiNavbar } from '../Navbar/GrowiNavbar';
|
|
import { GrowiNavbar } from '../Navbar/GrowiNavbar';
|
|
|
import Sidebar from '../Sidebar';
|
|
import Sidebar from '../Sidebar';
|
|
|
|
|
|
|
@@ -37,32 +34,21 @@ export const BasicLayout = ({
|
|
|
children, title, className, expandContainer,
|
|
children, title, className, expandContainer,
|
|
|
}: Props): JSX.Element => {
|
|
}: Props): JSX.Element => {
|
|
|
|
|
|
|
|
- const { data: currentPathname } = useCurrentPathname();
|
|
|
|
|
-
|
|
|
|
|
- const isSharedPage = pagePathUtils.isSharedPage(currentPathname ?? '');
|
|
|
|
|
-
|
|
|
|
|
const myClassName = `${className ?? ''} ${expandContainer ? 'growi-layout-fluid' : ''}`;
|
|
const myClassName = `${className ?? ''} ${expandContainer ? 'growi-layout-fluid' : ''}`;
|
|
|
|
|
|
|
|
return (
|
|
return (
|
|
|
<RawLayout title={title} className={myClassName}>
|
|
<RawLayout title={title} className={myClassName}>
|
|
|
<GrowiNavbar />
|
|
<GrowiNavbar />
|
|
|
|
|
|
|
|
- {isSharedPage
|
|
|
|
|
- ? (
|
|
|
|
|
- <>{children}</>
|
|
|
|
|
- )
|
|
|
|
|
- : (
|
|
|
|
|
- <div className="page-wrapper d-flex d-print-block">
|
|
|
|
|
- <div className="grw-sidebar-wrapper">
|
|
|
|
|
- <Sidebar />
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <div className="page-wrapper d-flex d-print-block">
|
|
|
|
|
+ <div className="grw-sidebar-wrapper">
|
|
|
|
|
+ <Sidebar />
|
|
|
|
|
+ </div>
|
|
|
|
|
|
|
|
- <div className="flex-fill mw-0">
|
|
|
|
|
- {children}
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- )
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ <div className="flex-fill mw-0">
|
|
|
|
|
+ {children}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
|
|
|
<GrowiNavbarBottom />
|
|
<GrowiNavbarBottom />
|
|
|
|
|
|