<script lang="ts">
	import { goto } from '$app/navigation';
	import { isAuthenticated } from '$lib/stores/auth';
	import { browser } from '$app/environment';

	// Redirect based on auth state
	$: if (browser) {
		if ($isAuthenticated) {
			goto('/dashboard');
		} else {
			goto('/login');
		}
	}
</script>

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