diff --git a/apps/web/src/lib/components/CreateCollectiveModal.svelte b/apps/web/src/lib/components/CreateCollectiveModal.svelte index 26ebf68..6c4d9ae 100644 --- a/apps/web/src/lib/components/CreateCollectiveModal.svelte +++ b/apps/web/src/lib/components/CreateCollectiveModal.svelte @@ -2,6 +2,7 @@ import { goto } from '$app/navigation'; import { getSupabase } from '$lib/supabase'; import { currentCollective, userCollectives } from '$lib/stores/collective'; + import Spinner from './Spinner.svelte'; import * as m from '$lib/paraglide/messages'; let { onClose }: { onClose: () => void } = $props(); @@ -102,11 +103,16 @@ type="submit" data-testid="create-collective-modal-submit" disabled={!name.trim() || creating} - class="rounded-lg bg-slate-900 px-4 py-1.5 text-sm font-semibold text-white + class="inline-flex items-center gap-2 rounded-lg bg-slate-900 px-4 py-1.5 text-sm font-semibold text-white transition-opacity hover:opacity-90 disabled:opacity-50 dark:bg-slate-50 dark:text-slate-900" > - {creating ? m.loading() : m.create_collective_modal_button()} + {#if creating} + + {m.loading()} + {:else} + {m.create_collective_modal_button()} + {/if} diff --git a/apps/web/src/routes/(app)/+layout.svelte b/apps/web/src/routes/(app)/+layout.svelte index 1cfce8a..bfa220f 100644 --- a/apps/web/src/routes/(app)/+layout.svelte +++ b/apps/web/src/routes/(app)/+layout.svelte @@ -17,6 +17,7 @@ import BottomTabBar from '$lib/components/layout/BottomTabBar.svelte'; import MobileDrawer from '$lib/components/layout/MobileDrawer.svelte'; import UndoToast from '$lib/components/UndoToast.svelte'; + import Spinner from '$lib/components/Spinner.svelte'; import * as m from '$lib/paraglide/messages'; let { children }: { children: Snippet } = $props(); @@ -149,8 +150,9 @@ {#if $authLoading} -
- {m.loading()} +
+ + {m.loading()}
{:else if $isAuthenticated}