fix: update registration redirect and wordmark navigation
- Simplify registration redirect after session refresh - Update wordmark to use dynamic href based on session/role - Add anchor tag for wordmark to avoid Next.js Link issues
This commit is contained in:
@@ -37,16 +37,18 @@ export default function RegisterPage() {
|
||||
} else {
|
||||
console.log("Signup successful, redirecting...");
|
||||
console.log("Result data:", result.data);
|
||||
|
||||
// Refresh the session after successful registration
|
||||
try {
|
||||
await refreshSession()
|
||||
await refreshSession();
|
||||
console.log("Session refreshed successfully");
|
||||
} catch (err) {
|
||||
console.error("Failed to refresh session:", err);
|
||||
}
|
||||
|
||||
// Redirect to admin page which will redirect to profile if not admin
|
||||
console.log("About to redirect to /admin");
|
||||
router.push("/admin")
|
||||
router.refresh()
|
||||
router.push("/admin");
|
||||
console.log("Redirect initiated");
|
||||
}
|
||||
} catch (err) {
|
||||
|
||||
Reference in New Issue
Block a user