Closed AkioSarkiz closed 9 months ago
@AkioSarkiz Depending on stack/framework you use you can fix this by importing EdgeSidebar
in SSR disabled mode.
Eg. in Next.js you can import this component like this:
import dynamic from 'next/dynamic'
import { Root, Header, ..... } from '@mui-treasury/layout'
const EdgeSidebar = dynamic(() => import('@mui-treasury/layout').then(mod => mod.EdgeSidebar), { ssr: false })
Then you can use EdgeSidebar
like regular React component in your layout.
Not sure if there is a better way to fix this. Probably there is something wrong in lib and @siriwatknp don't have time to fix this. Sometimes these kind of hacks are the only way to proceed with projects.
Example code: