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

Setup/frontend user identity #100

Merged
merged 16 commits into from
Dec 17, 2023
Merged

Setup/frontend user identity #100

merged 16 commits into from
Dec 17, 2023

Conversation

samderanova
Copy link
Contributor

Address #91. Set up a utility function to get the user's identity and use prop drilling like what we did with Sanity requests to send the identity as a prop to the navbar component since the navbar is a client component.

@samderanova samderanova linked an issue Dec 16, 2023 that may be closed by this pull request
@samderanova samderanova requested a review from taesungh December 16, 2023 19:16
apps/site/src/lib/components/Navbar/Navbar.tsx Outdated Show resolved Hide resolved
apps/site/src/lib/components/Navbar/Navbar.tsx Outdated Show resolved Hide resolved
apps/site/src/lib/components/Navbar/Navbar.tsx Outdated Show resolved Hide resolved
apps/site/src/lib/components/Navbar/Navbar.tsx Outdated Show resolved Hide resolved
apps/site/src/lib/components/Navbar/NavbarParent.tsx Outdated Show resolved Hide resolved
apps/site/src/lib/components/Navbar/NavbarParent.tsx Outdated Show resolved Hide resolved
apps/site/src/lib/utils/getUserIdentity.ts Outdated Show resolved Hide resolved
apps/site/src/lib/utils/getUserIdentity.ts Outdated Show resolved Hide resolved
Copy link
Contributor

github-actions bot commented Dec 16, 2023

Deploy preview for irvinehacks-site-2024-sanity ready!

Name Sanity Studio
Preview Visit Preview
Commit df07b75

Copy link
Contributor

github-actions bot commented Dec 16, 2023

Deploy preview for irvinehacks-site-2024 ready!

Name IrvineHacks 2024 Site
Preview Visit Preview
Commit df07b75

@samderanova samderanova force-pushed the setup/frontend-user-identity branch 2 times, most recently from 17a5f6a to 4883662 Compare December 16, 2023 22:10
@samderanova samderanova requested a review from taesungh December 16, 2023 22:45
Copy link
Member

@taesungh taesungh left a comment

Choose a reason for hiding this comment

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

Thanks for finding a way to make this work. Approving to unblock, we can revisit later if needed.

@samderanova samderanova requested a review from njhuey December 17, 2023 18:15
Copy link
Contributor

@njhuey njhuey left a comment

Choose a reason for hiding this comment

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

lgmt

@samderanova samderanova merged commit 6972d60 into main Dec 17, 2023
4 checks passed
samderanova added a commit that referenced this pull request Dec 18, 2023
* setup: get user identity utility

* feat: integrate user identity with navbar

* fix: formatting

* fix: remove duplicate Identity declaration

* fix: disable prefetch for logout route

* feat: logout rewrite

* feat: server side redirect for logout

* fix: restore logout next rewrite

* fix: prefetch on login route

* replace next link with a tag

* fix: redirect instead of rewrite

* fix: remove redirect caching

* fix: replace next/link with

* fix: error handling for identity fetch

* fix: logout page with redirect

* fix: use redirect next/navigation
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.

Determine how to pass user data through components
3 participants