Skip to content

Conversation

@pankaj-raikar
Copy link

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Nov 16, 2025

⚠️ No Changeset found

Latest commit: fc911ea

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a 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".

Comment on lines +1 to +4
'use client';
import { redirect } from 'next/navigation';
import type React from 'react';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Comment on lines +1 to +4
'use client';
import { redirect } from 'next/navigation';
import type React from 'react';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

@zbeyens zbeyens closed this Nov 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants