Browse Source

logout in profile

master
nicolas-arnaud 2 years ago
parent
commit
d3e09499c4
  1. 1
      front/volume/src/App.svelte
  2. 3
      front/volume/src/components/Profile.svelte

1
front/volume/src/App.svelte

@ -111,7 +111,6 @@
{#if $store === null} {#if $store === null}
<h1><button type="button" on:click={login}>Log In</button></h1> <h1><button type="button" on:click={login}>Log In</button></h1>
{:else} {:else}
<h1><button type="button" on:click={logout}>Log Out</button></h1>
<Navbar <Navbar
{clickProfile} {clickProfile}
{clickHistory} {clickHistory}

3
front/volume/src/components/Profile.svelte

@ -1,5 +1,5 @@
<script lang="ts"> <script lang="ts">
import { API_URL, store } from "../Auth"; import { API_URL, store, logout } from "../Auth";
export let username = $store.userame; export let username = $store.userame;
export let realname = ""; export let realname = "";
@ -64,6 +64,7 @@
{/if} {/if}
</button> </button>
</form> </form>
<button type="button" on:click={logout}>Log Out</button>
</div> </div>
</div> </div>
</div> </div>

Loading…
Cancel
Save