Fix staff login to preserve redirect destination
cgen-88ec16e7083f4d1596f5bf32b797d96d
This commit is contained in:
parent
7d451e8bba
commit
6457e7479b
1 changed files with 2 additions and 1 deletions
|
|
@ -95,7 +95,8 @@ export default function StaffLogin() {
|
||||||
const handleGoogleSignIn = async () => {
|
const handleGoogleSignIn = async () => {
|
||||||
setIsLoading(true);
|
setIsLoading(true);
|
||||||
try {
|
try {
|
||||||
await signInWithOAuth("google");
|
// Pass the staff dashboard as the intended destination after OAuth completes
|
||||||
|
await signInWithOAuth("google", "/staff/dashboard");
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
console.error("Google sign-in error:", error);
|
console.error("Google sign-in error:", error);
|
||||||
toastError({
|
toastError({
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue