Skip to content

Commit

Permalink
fix(useStayConnectedToast): always show toast only once
Browse files Browse the repository at this point in the history
  • Loading branch information
BrickheadJohnny committed Jul 24, 2024
1 parent 9594a4a commit d6b0ec2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/[guild]/StayConnectedToast.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ const useStayConnectedToast = (onClick: () => void) => {
useLocalStorage(`hasSeenAddContactInfoToast-${id}`, false)

const showAddContactInfoToast = useCallback(() => {
if (!!toastIdRef.current) return

setHasSeenAddContactInfoToast(true)

toastIdRef.current = toastWithButton({
id: CONTACT_TOAST_ID,
status: "info",
Expand Down

0 comments on commit d6b0ec2

Please sign in to comment.