refactor: home route is now /dashboard
This commit is contained in:
@@ -5,7 +5,7 @@ import type { AuthFormField, FormSubmitEvent } from "@nuxt/ui";
|
||||
definePageMeta({
|
||||
middleware: () => {
|
||||
const { loggedIn } = useUserSession();
|
||||
if (loggedIn.value) return navigateTo("/");
|
||||
if (loggedIn.value) return navigateTo("/dashboard");
|
||||
},
|
||||
});
|
||||
|
||||
@@ -31,7 +31,7 @@ const onSubmit = async (event: FormSubmitEvent<Schema>) => {
|
||||
try {
|
||||
await $fetch("/api/auth/sign-in", { method: "POST", body: event.data });
|
||||
await fetchSession();
|
||||
await navigateTo("/");
|
||||
await navigateTo("/dashboard");
|
||||
} catch (e) {
|
||||
error.value = getApiError(e);
|
||||
} finally {
|
||||
|
||||
@@ -58,14 +58,14 @@ const deleteLink = async (link: Link) => {
|
||||
label: 'All',
|
||||
icon: 'i-lucide-link',
|
||||
badge: links?.length ?? 0,
|
||||
to: '/',
|
||||
to: '/dashboard',
|
||||
active: category === 'all',
|
||||
},
|
||||
{
|
||||
label: 'Disabled',
|
||||
icon: 'i-lucide-link-2-off',
|
||||
badge: links?.filter((l) => l.disabled).length ?? 0,
|
||||
to: '/?filter=disabled',
|
||||
to: '/dashboard?filter=disabled',
|
||||
active: category === 'disabled',
|
||||
},
|
||||
]"
|
||||
Reference in New Issue
Block a user