
This removes the useApp hook from all org pages in favor of various context. This means there is no longer global state that gets passed around, instead each component that requires access to something shared (like account, or navigation) can just use the context instead. This is a first step, as a lot of shared components stil rely on app not to mention the dev and lab sites.
31 lines
888 B
JavaScript
31 lines
888 B
JavaScript
import { MainSections, ActiveSection, ns as navNs } from './primary.mjs'
|
|
|
|
export const ns = navNs
|
|
|
|
export const AsideNavigation = ({ mobileOnly = false, before = [], after = [] }) => (
|
|
<aside
|
|
className={`
|
|
fixed top-0 right-0 h-screen
|
|
overflow-y-auto z-20
|
|
bg-base-100 text-base-content
|
|
px-0 pb-20 pt-8 shrink-0
|
|
|
|
lg:w-auto
|
|
lg:sticky lg:relative lg:transform-none
|
|
lg:justify-center
|
|
lg:border lg:border-dashed lg:border-l-0 lg:border-t-0 lg:border-b-0 lg:border-r-1 lg:border-base-300
|
|
lg:bg-base-300 lg:bg-opacity-10
|
|
lg:pt-16
|
|
${mobileOnly ? 'block lg:hidden w-full ' : ''}
|
|
`}
|
|
>
|
|
<div className="w-screen lg:w-auto">
|
|
{before}
|
|
<MainSections />
|
|
<div className="border border-l-0 border-r-0 border-b-0 border-dashed border-base-300 mt-4 pt-4">
|
|
<ActiveSection />
|
|
</div>
|
|
{after}
|
|
</div>
|
|
</aside>
|
|
)
|