⚡ AuthCheck Component
Show and hide content for the authenticated user
AuthCheck Component
<script lang="ts">
import { user } from "$lib/firebase";
</script>
{#if $user}
<slot />
{:else}
<p class="text-error">
You must be signed in to view this page.
<a class="btn btn-primary" href="/login">Sign in</a>
</p>
{/if}