-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #129 from dappforce/deploy/tailwind
Fix issue where creators page get rendered without css for fraction of second
- Loading branch information
Showing
4 changed files
with
69 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { useSidebarCollapsed } from '@/components/providers/SideBarCollapsedContext' | ||
import { Drawer } from 'antd' | ||
import clsx from 'clsx' | ||
import dynamic from 'next/dynamic' | ||
import { useRouter } from 'next/router' | ||
import { FunctionComponent, useEffect } from 'react' | ||
|
||
const Menu = dynamic(() => import('./SideMenu'), { ssr: false }) | ||
|
||
const DefaultNav: FunctionComponent<{ className?: string }> = ({ | ||
className, | ||
}) => { | ||
const { | ||
state: { collapsed }, | ||
hide, | ||
} = useSidebarCollapsed() | ||
const { asPath } = useRouter() | ||
|
||
useEffect(() => hide(), [ asPath ]) | ||
|
||
return ( | ||
<Drawer | ||
className={clsx('DfSideBar h-100', className)} | ||
bodyStyle={{ padding: 0 }} | ||
placement='left' | ||
closable={false} | ||
onClose={hide} | ||
visible={!collapsed} | ||
getContainer={false} | ||
keyboard | ||
> | ||
<Menu /> | ||
</Drawer> | ||
) | ||
} | ||
|
||
export default DefaultNav |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import Sider from 'antd/lib/layout/Sider' | ||
import dynamic from 'next/dynamic' | ||
|
||
const Menu = dynamic(() => import('./SideMenu'), { ssr: false }) | ||
|
||
const HomeNav = () => { | ||
return ( | ||
<Sider | ||
className='DfSider' | ||
width='230' | ||
trigger={null} | ||
collapsible | ||
collapsed={true} | ||
> | ||
<Menu /> | ||
</Sider> | ||
) | ||
} | ||
|
||
export default HomeNav |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters