cms
cms copied to clipboard
refactor: replace client-side <Redirect/> with server-side redirect()
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.tsxfile 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.tsxcomponent - 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!