Fix login redirect: use router.push('/dashboard') instead of window.location.href

window.location.href bypasses Next.js basePath, sending to /dashboard instead of /ppt-tool/dashboard.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Vadym Samoilenko 2026-03-19 22:45:42 +00:00
parent 1e00d480e2
commit 1e28574512

View file

@ -40,7 +40,7 @@ export default function LoginPage() {
});
if (response.ok) {
window.location.href = '/dashboard';
router.push('/dashboard');
} else {
const data = await response.json();
setError(data.detail || 'Invalid credentials');