Skip to content

Commit

Permalink
Merge pull request #1092 from near/fix_signin-up_redirect
Browse files Browse the repository at this point in the history
fix: fix truthy check to ensure signup/signup redirect shows modal
  • Loading branch information
charleslavon authored Mar 26, 2024
2 parents 34534b5 + 176f53b commit 752a04f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/pages/applications.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@ const ApplicationsPage: NextPageWithLayout = () => {
const router = useRouter();
const { requestAuthentication } = useSignInRedirect();
const authStore = useAuthStore();
const accountId = authStore.accountId;

useEffect(() => {
const { requestAuth, createAccount } = router.query;
if (requestAuth && !authStore.account) {
if (requestAuth && !accountId) {
requestAuthentication(!!createAccount);
}
}, [authStore, requestAuthentication, router.query]);
}, [accountId, requestAuthentication, router.query]);

return (
<ComponentWrapperPage
Expand Down

0 comments on commit 752a04f

Please sign in to comment.