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:
parent
1e00d480e2
commit
1e28574512
1 changed files with 1 additions and 1 deletions
|
|
@ -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');
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue