2025-08-06 14:31:16 +02:00
|
|
|
<template>
|
2025-08-07 17:21:18 +02:00
|
|
|
<div class="loading-container">
|
|
|
|
|
<v-container fluid class="fill-height">
|
|
|
|
|
<v-row justify="center" align="center">
|
|
|
|
|
<v-col cols="auto" class="text-center">
|
|
|
|
|
<v-progress-circular
|
|
|
|
|
indeterminate
|
|
|
|
|
color="primary"
|
|
|
|
|
size="64"
|
|
|
|
|
width="6"
|
|
|
|
|
/>
|
|
|
|
|
<p class="mt-4 text-h6">Loading...</p>
|
|
|
|
|
</v-col>
|
|
|
|
|
</v-row>
|
|
|
|
|
</v-container>
|
2025-08-06 14:31:16 +02:00
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
2025-08-07 17:21:18 +02:00
|
|
|
// NO top-level navigation - this causes SSR issues and loops!
|
|
|
|
|
// Let middleware and lifecycle hooks handle routing properly
|
2025-08-06 14:31:16 +02:00
|
|
|
|
2025-08-07 17:21:18 +02:00
|
|
|
onMounted(() => {
|
|
|
|
|
const { isAuthenticated } = useAuth();
|
|
|
|
|
|
|
|
|
|
// Route after component is mounted (client-side only)
|
|
|
|
|
if (isAuthenticated.value) {
|
|
|
|
|
navigateTo('/dashboard');
|
|
|
|
|
} else {
|
|
|
|
|
navigateTo('/login');
|
|
|
|
|
}
|
|
|
|
|
});
|
2025-08-06 14:31:16 +02:00
|
|
|
</script>
|
2025-08-07 17:21:18 +02:00
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
.loading-container {
|
|
|
|
|
min-height: 100vh;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
}
|
|
|
|
|
</style>
|