hard redirect after login to pick up cookies
This commit is contained in:
@@ -31,7 +31,7 @@ export default function AdminLogin() {
|
||||
setError('')
|
||||
try {
|
||||
await api.post('/admin/login', { email, password })
|
||||
nav('/admin')
|
||||
window.location.href = '/admin'
|
||||
} catch {
|
||||
setError('Invalid credentials')
|
||||
} finally {
|
||||
@@ -54,8 +54,7 @@ export default function AdminLogin() {
|
||||
setError('')
|
||||
try {
|
||||
await api.post('/admin/setup', { email, password })
|
||||
toast.success('Admin account created')
|
||||
nav('/admin')
|
||||
window.location.href = '/admin'
|
||||
} catch {
|
||||
setError('Setup failed')
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user