You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
646 B
25 lines
646 B
import { ReactNode } from "react"; |
|
|
|
import { useBannerSize, useBannerStore } from "@/stores/banner"; |
|
import { BannerLocation } from "@/stores/banner/BannerLocation"; |
|
|
|
export function Layout(props: { children: ReactNode }) { |
|
const bannerSize = useBannerSize(); |
|
const location = useBannerStore((s) => s.location); |
|
|
|
return ( |
|
<div> |
|
<div className="fixed inset-x-0 z-[1000]"> |
|
<BannerLocation /> |
|
</div> |
|
<div |
|
style={{ |
|
paddingTop: location === null ? `${bannerSize}px` : "0px", |
|
}} |
|
className="flex min-h-screen flex-col" |
|
> |
|
{props.children} |
|
</div> |
|
</div> |
|
); |
|
}
|
|
|