File size: 1,222 Bytes
df83860
 
 
 
 
 
 
d160b97
df83860
 
d160b97
df83860
 
 
 
 
 
 
 
 
 
 
 
 
 
d160b97
df83860
 
 
 
 
2ed75c8
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
"use client"
import { ReactNode } from "react"

import { cn } from "@/lib/utils"
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)
  return (
    <div className={cn(
      `dark flex flex-row h-screen w-screen inset-0 overflow-hidden`,
       view === "public_video"
       ? `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)]`,
        `px-2`
      )}>
        <TopHeader />
        <main className={cn(
          `w-full overflow-x-hidden overflow-y-scroll`,
          `h-[calc(100%-200px)]`,
          headerMode === "normal"
            ? `sm:h-[calc(100vh-112px)]`
            : `sm:h-[calc(100vh-48px)]`
          )}>
          {children}
        </main>
        <MobileBottomMenu />
      </div>
    </div>
  )
}