Skip to content

Fix: Show inviter name on login modal for unauthenticated users#44

Merged
ProLoser merged 1 commit intomainfrom
fix/invite-login-modal
Jun 26, 2025
Merged

Fix: Show inviter name on login modal for unauthenticated users#44
ProLoser merged 1 commit intomainfrom
fix/invite-login-modal

Conversation

@ProLoser
Copy link
Owner

Refactored the load function and auth handling to ensure that when an invite link is opened by an unauthenticated user, the inviter's name is fetched and displayed on the login modal.

Previously, friend data was only loaded if a user was authenticated, leading to a generic login modal even with an invite link.

Changes:

  • load function in src/index.tsx now separates fetching friend details from loading match data. Friend details can be fetched even if the user is not authenticated.
  • useEffect for auth state changes in src/index.tsx now calls load appropriately to fetch friend details if a friend ID is present in the URL, regardless of auth state.
  • Confirmed Login.tsx correctly uses the friendData prop and the 'Decline Invitation' button behavior is appropriate with the refactored load logic.

Refactored the `load` function and auth handling to ensure that when an
invite link is opened by an unauthenticated user, the inviter's name
is fetched and displayed on the login modal.

Previously, friend data was only loaded if a user was authenticated,
leading to a generic login modal even with an invite link.

Changes:
- `load` function in `src/index.tsx` now separates fetching friend
  details from loading match data. Friend details can be fetched
  even if the user is not authenticated.
- `useEffect` for auth state changes in `src/index.tsx` now calls
  `load` appropriately to fetch friend details if a friend ID is
  present in the URL, regardless of auth state.
- Confirmed `Login.tsx` correctly uses the `friendData` prop and
  the 'Decline Invitation' button behavior is appropriate with the
  refactored `load` logic.
@ProLoser ProLoser merged commit 89df0f8 into main Jun 26, 2025
1 check passed
@ProLoser ProLoser deleted the fix/invite-login-modal branch June 26, 2025 20:44
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.

1 participant