Fix staff login to preserve redirect destination

cgen-88ec16e7083f4d1596f5bf32b797d96d
This commit is contained in:
Builder.io 2025-11-10 19:28:11 +00:00
parent 7d451e8bba
commit 6457e7479b

View file

@ -95,7 +95,8 @@ export default function StaffLogin() {
const handleGoogleSignIn = async () => {
setIsLoading(true);
try {
await signInWithOAuth("google");
// Pass the staff dashboard as the intended destination after OAuth completes
await signInWithOAuth("google", "/staff/dashboard");
} catch (error: any) {
console.error("Google sign-in error:", error);
toastError({