<script lang="ts">
	import Footer from '$lib/components/Footer.svelte';
	import Header from '$lib/components/Header.svelte';

	export let data;
</script>

{#if data.user?.admin}

<div class="h-screen v-screen flex flex-col">
	<div class="flex flex-col h-full">
		<Header {data}/>

		<div class="h-full grow overflow-scroll">
			<slot />
		</div>
		<Footer {data}/>

	</div>
</div>

{:else}

<div class="h-screen bg-white"><slot /></div>


{/if}