1
0
Fork 0
mirror of https://github.com/sussy-code/smov.git synced 2024-12-21 14:47:41 +01:00
smov/src/setup/Layout.tsx
2023-10-21 21:44:08 +02:00

25 lines
646 B
TypeScript

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>
);
}