Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
File size: 1,421 Bytes
df83860 f42b4a1 df83860 d160b97 df83860 d160b97 df83860 e40bd21 df83860 f42b4a1 df83860 d160b97 f8ca042 df83860 da6f0c4 df83860 2ed75c8 df83860 d160b97 df83860 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
"use client"
import { ReactNode } from "react"
import { cn } from "@/lib/utils/cn"
import { useStore } from "@/app/state/useStore"
import { LeftMenu } from "../left-menu"
import { MobileBottomMenu } from "../mobile-bottom-menu"
import { TopHeader } from "../top-header"
export function TubeLayout({ children }: { children?: ReactNode }) {
const headerMode = useStore(s => s.headerMode)
const view = useStore(s => s.view)
if (headerMode === "hidden") {
return (
<div className={cn(
`dark flex flex-row h-screen w-screen inset-0 overflow-hidden`
)}>
{children}
</div>
)
}
return (
<div className={cn(
`dark flex flex-row h-screen w-screen inset-0 overflow-hidden`,
view === "public_media"
? `bg-gradient-radial from-neutral-900 to-neutral-950`
: ''// bg-gradient-to-br from-neutral-950 via-neutral-950 to-neutral-950`
)}>
<LeftMenu />
<div className={cn(
`flex flex-col`,
`w-full sm:w-[calc(100vw-96px)]`,
`pl-2`
)}>
<TopHeader />
<main className={cn(
`w-full overflow-x-hidden overflow-y-scroll`,
`h-[calc(100%-116px)]`,
headerMode === "normal"
? `sm:h-[calc(100vh-112px)]`
: `sm:h-[calc(100vh-48px)]`
)}>
{children}
</main>
<MobileBottomMenu />
</div>
</div>
)
}
|