<script>
  import { goto } from '$app/navigation';
  import { auth } from '$lib/stores/auth.js';
  import { onMount } from 'svelte';

  onMount(() => {
    // Redirect based on auth status
    if ($auth.isAuthenticated) {
      goto('/dashboard');
    } else {
      goto('/login');
    }
  });
</script>

<div class="flex min-h-screen items-center justify-center">
  <span class="loading loading-spinner loading-lg text-primary"></span>
</div>
