This commit is contained in:
EvanLin3141
2025-02-12 00:49:12 +00:00
5 changed files with 20 additions and 4 deletions

View File

@@ -3,7 +3,8 @@ import { useEffect } from "react";
export default function GoogleLogin() {
const handleLoginClick = (e: React.MouseEvent<HTMLButtonElement>) => {
e.preventDefault();
window.location.href = "/api/login/google";
const nextUrl = encodeURIComponent(window.location.href);
window.location.href = `/api/login/google?next=${nextUrl}`;
};
return (