-
Notifications
You must be signed in to change notification settings - Fork 10
Dashboard UI #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dashboard UI #8
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| 'use client'; | ||
| import { redirect } from 'next/navigation'; | ||
| import type React from 'react'; | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid server-only redirect in client dashboard layout
This layout is marked 'use client' but imports and calls redirect from next/navigation, which is a server-only API. Next.js will throw “redirect is not supported in Client Components” as soon as this module is loaded, so the dashboard layout fails to compile/render and no redirect occurs for unauthenticated users. Use client navigation (e.g., router.push/replace) or move the redirect logic into a server component.
Useful? React with 👍 / 👎.
| 'use client'; | ||
| import { redirect } from 'next/navigation'; | ||
| import type React from 'react'; | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Admin layout uses server-only redirect in client component
The admin layout is a client component ('use client') but still imports redirect from next/navigation. That function is only allowed in server components, so Next.js will error at build/runtime with “redirect is not supported in Client Components,” preventing the admin area from rendering and breaking unauthenticated redirects. Replace this with client-side routing or move the redirect to a server layer.
Useful? React with 👍 / 👎.
No description provided.