pstream is dead; long live pstream taciturnaxolotl.github.io/pstream-ng/
at main 25 lines 646 B view raw
1import { ReactNode } from "react"; 2 3import { useBannerSize, useBannerStore } from "@/stores/banner"; 4import { BannerLocation } from "@/stores/banner/BannerLocation"; 5 6export function Layout(props: { children: ReactNode }) { 7 const bannerSize = useBannerSize(); 8 const location = useBannerStore((s) => s.location); 9 10 return ( 11 <div> 12 <div className="fixed inset-x-0 z-[1000]"> 13 <BannerLocation /> 14 </div> 15 <div 16 style={{ 17 paddingTop: location === null ? `${bannerSize}px` : "0px", 18 }} 19 className="flex min-h-screen flex-col" 20 > 21 {props.children} 22 </div> 23 </div> 24 ); 25}