aboutsummaryrefslogtreecommitdiffstats
path: root/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/components')
-rw-r--r--src/components/AppHeader.svelte4
-rw-r--r--src/components/RegisterOrLogin.svelte4
2 files changed, 5 insertions, 3 deletions
diff --git a/src/components/AppHeader.svelte b/src/components/AppHeader.svelte
index 6376e27f..b096f01e 100644
--- a/src/components/AppHeader.svelte
+++ b/src/components/AppHeader.svelte
@@ -14,9 +14,11 @@
<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..f5764a85 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(() => goto('/receive'));
};
</script>