Skip to content

refactor: replace client-side <Redirect/> with server-side redirect() #1867

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

karmanayS
Copy link

@karmanayS karmanayS commented Jul 17, 2025

Changes

  • Replaced <Redirect to="/" /> client component with the built-in redirect() function from next/navigation in src/app/(main)/(pages)/layout.tsx and src/app/(main)/(pages)/home/page.tsx
  • Deleted the Redirect.tsx file in src/components as it is no longer being used in the codebase

Testing

  • Verified that redirection still works when the user is unauthenticated
  • Confirmed that deleted component is not used elsewhere in the repo

Checklist before requesting a review

  • Uses server-side redirect() where appropriate
  • Deleted unused Redirect.tsx component
  • All functionality tested locally
  • No breaking changes introduced
  • I have performed a self-review of my code
  • I assure there is no similar/duplicate pull request regarding same issue

Let me know if there's anything you'd like me to adjust or if further changes are needed!

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.

1 participant