Use resolve() for all internal hrefs and goto paths to ensure correct

routing
This commit is contained in:
2025-11-12 23:18:41 -03:00
parent a2451baafc
commit bd574aedc0
32 changed files with 168 additions and 136 deletions

View File

@@ -3,6 +3,7 @@
import { api } from '@sgse-app/backend/convex/_generated/api';
import { authStore } from '$lib/stores/auth.svelte';
import { goto } from '$app/navigation';
import { resolve } from '$app/paths';
import { onMount } from 'svelte';
const convex = useConvexClient();
@@ -19,7 +20,7 @@
onMount(() => {
if (!currentUser?.data) {
goto('/');
goto(resolve('/'));
}
});
@@ -112,7 +113,7 @@
// Redirecionar após 2 segundos
setTimeout(() => {
goto('/');
goto(resolve('/'));
}, 2000);
} else {
notice = {
@@ -131,7 +132,7 @@
}
function cancelar() {
goto('/');
goto(resolve('/'));
}
</script>
@@ -161,7 +162,7 @@
<!-- Breadcrumbs -->
<div class="breadcrumbs mb-6 text-sm">
<ul>
<li><a href="/">Dashboard</a></li>
<li><a href={resolve('/')}>Dashboard</a></li>
<li>Alterar Senha</li>
</ul>
</div>