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

Nick/neos 622 navigating to home page results in no redirect #1085

Merged

Conversation

nickzelei
Copy link
Member

@nickzelei nickzelei commented Jan 9, 2024

  • fixes edge case where both user and found are undefined
  • makes useSession call require authentication
  • handles case where someone puts in bad account in url, will handle redirecting to home page.

Copy link

linear bot commented Jan 9, 2024

Copy link

vercel bot commented Jan 9, 2024

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

Name Status Preview Comments Updated (UTC)
neosync-docs 🛑 Canceled (Inspect) Jan 9, 2024 9:28pm
neosync-marketing 🛑 Canceled (Inspect) Jan 9, 2024 9:28pm

@@ -58,7 +58,7 @@ export default function AccountProvider(props: Props): ReactElement {
const foundAccount = accountsResponse?.accounts.find(
(a) => a.name === accountName
);
if (userAccount?.id === foundAccount?.id) {
if (userAccount && foundAccount && userAccount?.id === foundAccount?.id) {
Copy link
Member Author

@nickzelei nickzelei Jan 9, 2024

Choose a reason for hiding this comment

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

pesky little fucker.

hitting an edge case where userAccount?.id === foundAccount?.id were both undefined which made it equal true.

@nickzelei nickzelei merged commit 11c533a into main Jan 9, 2024
6 checks passed
@nickzelei nickzelei deleted the nick/neos-622-navigating-to-home-page-results-in-no-redirect branch January 9, 2024 21:32
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.

None yet

1 participant