feat: just getting better and better
Some checks failed
Backend CI/CD / build_and_deploy (push) Has been cancelled
Frontend CI/CD / build_and_deploy (push) Has been cancelled

This commit is contained in:
2026-05-04 21:34:38 -04:00
parent 664eb07201
commit b7379cf823
45 changed files with 1411 additions and 11114 deletions

View File

@@ -145,14 +145,20 @@
const props = defineProps({
returnUrl: {
type: String,
default: '/landing',
default: '/app/dashboard',
},
});
function getPostLoginUrl() {
return props.returnUrl?.startsWith('/app')
? props.returnUrl
: '/app/dashboard';
}
async function handleLocalLogin() {
try {
await authStore.login(email.value, password.value);
await router.push(props.returnUrl);
await router.push(getPostLoginUrl());
} catch (error) {
console.error('Login failed:', error);
errorSnackBar.value = true;
@@ -163,7 +169,7 @@
try {
const response = await authStore.loginWithGoogle(JSON.stringify(token));
if (response === true) {
await router.push(props.returnUrl);
await router.push(getPostLoginUrl());
} else {
errorSnackBar.value = true;
}
@@ -177,7 +183,7 @@
try {
const response = await loginWithFacebook();
if (response === true) {
await router.push(props.returnUrl);
await router.push(getPostLoginUrl());
} else {
errorSnackBar.value = true;
}