Closed Neptunium1129 closed 1 year ago
Nice, thanks for sharing @Neptunium1129 ! Glad I could be of help :)
PS: Because there's no action for me to do on this issue, I'm going to close it for now
I see the images now, reopening
In order to answer this:
but When logging out, the login page appears within a slot instead of appearing standalone.
Is it possible to transition to the LoginPage when logging out?
Would need more information on the app and how it's built
{#if sessionCheck == false}
<!-- content here -->
<NmsLogin on:sessionCheck={fnSessionCheck}></NmsLogin>
{:else}
<!-- else content here -->
{#await fnLoginCheckAxios()}
<div>LOGIN...</div>
{:then res}
{#if res.data.data.customerYn=="Y"}
<NmsCustMain on:sessionCheck={fnSessionCheck} {fnSessionCheck} loginUser={res.data.data}>
<span slot="content">
<Router {routes} >
</Router>
</span>
</NmsCustMain>
{:else}
<NmsMain on:sessionCheck={fnSessionCheck} loginUser={res}}>
<span slot="content">
<Router {routes} >
</Router>
</span>
</NmsMain>
{/if}
{:catch error}
<div>LOGIN FAIL...</div>
{/await}
{/if}
When the logout button is clicked, the user is directed to a standalone page. However, if authentication is interrupted in the middle, the login page is displayed within a slot.
my sidebar example
https://sophana.github.io/svelte-spa-router-sidebar/docs/
It is very similar based on this project
but When logging out, the login page appears within a slot instead of appearing standalone.
Is it possible to transition to the LoginPage when logging out?