From 482265475b029fbcfa857b7186d70663606785fc Mon Sep 17 00:00:00 2001 From: Xyphyn Date: Tue, 1 Aug 2023 13:46:31 -0700 Subject: [PATCH] feat: add account switching from sidebar --- src/lib/components/ui/Sidebar.svelte | 43 +++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 4 deletions(-) diff --git a/src/lib/components/ui/Sidebar.svelte b/src/lib/components/ui/Sidebar.svelte index 8892e750..82f76b0c 100644 --- a/src/lib/components/ui/Sidebar.svelte +++ b/src/lib/components/ui/Sidebar.svelte @@ -6,10 +6,13 @@ Home, Icon, Plus, + UserCircle, } from 'svelte-hero-icons' import Button from '../input/Button.svelte' import Avatar from '$lib/components/ui/Avatar.svelte' - import { profile } from '$lib/auth.js' + import { profile, profileData, setUserID } from '$lib/auth.js' + import { goto } from '$app/navigation' + import { page } from '$app/stores' let expanded = true @@ -29,6 +32,7 @@ mini size="16" class="transition-transform {expanded ? '' : 'rotate-180'}" + title="Toggle expanded" /> + {#if $profileData.profiles.length >= 1} +
+ {#each $profileData.profiles as prof, index} + + {/each} + {/if}
{#if $profile?.user} {#each $profile.user.follows @@ -84,7 +119,7 @@ {:else}