I have a different layout I need for ./routes/login pages...I'm trying to ignore the main ./routes/__layout.svelte file as I dont' need the sidebar.
<script>
import NavBar from '../components/NavBar.svelte';
</script>
<main>
{#if segment === 'login'}
<section>
<slot />
</section>
{:else}
<NavBar />
<section>
<slot />
</section>
{/if}
</main>
<style>
main {
display: flex;
justify-content: flex-start;
}
section {
padding: 2.4rem;
width: 100%;
background-color: #f2f6fa;
}
</style>
I get an error segment is not defined.