cms icon indicating copy to clipboard operation
cms copied to clipboard

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

Open karmanayS opened this issue 7 months ago • 0 comments

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!

karmanayS avatar Jul 17 '25 13:07 karmanayS