-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: update profile page to redirect based on user authenticatio…
…n and enhance hero filter with active state management
- Loading branch information
Showing
2 changed files
with
31 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import { getCurrentUser } from "@/lib/actions/user"; | ||
import { redirect } from "next/navigation"; | ||
|
||
const Page = async () => { | ||
return ( | ||
<div> | ||
<h1>Profile</h1> | ||
</div> | ||
); | ||
const currentUser = await getCurrentUser(); | ||
redirect(currentUser ? `/profile/${currentUser.name}` : "/auth/signin"); | ||
}; | ||
|
||
export default Page; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
00793c2
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.
Deploy preview for mlbb-fyi ready!
✅ Preview
https://mlbb-c6pm4p7pu-jinjays.vercel.app
Built with commit 00793c2.
This pull request is being automatically deployed with vercel-action