Skip to content
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

Use data from DB instead of NextAuth Session on Navbar #35

Merged
merged 5 commits into from
Jun 30, 2023

Conversation

nicolasbrandao
Copy link
Contributor

@nicolasbrandao nicolasbrandao commented Jun 28, 2023

Description

This PR makes Navbar use data from DB instead of NextAuth Session

  • Navbar now uses User data from the DB that comes through props
  • Create a function to fetch User from the DB using session data
  • Use the fetchUserWithSession to pass the loggedUser info from DB to Navbar as props
  • Add Links to profile page on the Navbar

Next Steps

  • Allow user to edit profile info

@vercel
Copy link

vercel bot commented Jun 28, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 30, 2023 6:12pm

@nicolasbrandao nicolasbrandao changed the title Use data from DB instead of NExtAuth Session on Navbar Use data from DB instead of NextAuth Session on Navbar Jun 28, 2023
Copy link
Contributor

@vitorschelb vitorschelb left a comment

Choose a reason for hiding this comment

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

Looks good to me! Great improvement, congrats for the hard work.

@Raysson-ornelas Raysson-ornelas marked this pull request as ready for review June 29, 2023 12:54
src/shared/db.ts Outdated Show resolved Hide resolved
src/app/app/layout.tsx Show resolved Hide resolved
@nicolasbrandao nicolasbrandao merged commit 4b58d04 into main Jun 30, 2023
@nicolasbrandao nicolasbrandao deleted the nicolasbrandao/use-db-data-on-navbar branch June 30, 2023 18:21
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.

4 participants