diff options
| author | secondl1ght <[email protected]> | 2022-07-30 13:01:35 -0600 |
|---|---|---|
| committer | secondl1ght <[email protected]> | 2022-07-30 13:01:35 -0600 |
| commit | 55719a6d91fad32dc1a633bbbfb5ad9a726ced50 (patch) | |
| tree | c235a822c8b570e6460e5d3b6773b5f025e24531 /src/components | |
| parent | 926b1cd61d5bca6e6e9fd3420681d0829341a1e0 (diff) | |
| parent | 7168cd2ea39aaa2158412bb5e966e144e8a22733 (diff) | |
| download | coinos-ui-55719a6d91fad32dc1a633bbbfb5ad9a726ced50.tar.gz coinos-ui-55719a6d91fad32dc1a633bbbfb5ad9a726ced50.zip | |
Merge branch 'master' of github.com:coinos/coinos-ui-v2
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/AppHeader.svelte | 8 | ||||
| -rw-r--r-- | src/components/RegisterOrLogin.svelte | 4 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/components/AppHeader.svelte b/src/components/AppHeader.svelte index 6376e27f..99eea6d5 100644 --- a/src/components/AppHeader.svelte +++ b/src/components/AppHeader.svelte @@ -8,15 +8,19 @@ <header class="bg-gradient-to-r from-primary to-gradient h-[20vh] w-full relative"> <nav class="flex justify-end items-center space-x-4 p-5"> - <button class="bg-white p-2 rounded-full w-12 h-12" on:click={() => goto('/receive')} + <a href={`/${$user.username}/receive`}> + <button class="bg-white p-2 rounded-full w-12 h-12" ><Icon icon="numpad" style="mx-auto" /></button > + </a> <button class="bg-white p-2 rounded-full w-12 h-12" ><Icon icon="clock" style="mx-auto" /></button > - <button class="bg-white p-2 rounded-full w-12 h-12" + <a href={`/${$user.username}`}> + <button class="bg-white p-2 rounded-full w-12 h-12" ><Icon icon="profile" style="mx-auto" /></button > + </a> <button class="bg-white p-2 rounded-full w-12 h-12" ><Icon icon="menu" style="mx-auto" /></button > diff --git a/src/components/RegisterOrLogin.svelte b/src/components/RegisterOrLogin.svelte index b42b8d7f..56b96499 100644 --- a/src/components/RegisterOrLogin.svelte +++ b/src/components/RegisterOrLogin.svelte @@ -1,7 +1,7 @@ <script> import { Icon } from '$comp'; import { post } from '$lib/utils'; - import { token } from '$lib/store'; + import { user, token } from '$lib/store'; import { auth } from '$lib/socket'; import { goto } from '$app/navigation'; @@ -22,7 +22,7 @@ if (!r.token) r = await post('/login', { username, password }); $token = r.token; auth(); - goto('/receive'); + user.subscribe(({ username }) => goto(`/${username}/receive`)); }; </script> |
