Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Commit

Permalink
Add conditional logic for redirecting to
Browse files Browse the repository at this point in the history
enterInviteCode modal
  • Loading branch information
hirbod committed Nov 20, 2023
1 parent faf07d4 commit 66b0b56
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions packages/app/components/home/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,37 @@ export const CreatorTokensBanner = ({
redirectToSelfServeExplainerModal();
return;
}

if (
user?.user?.data.profile.creator_token_onboarding_status ===
"requires_invite"
) {
router.push(
Platform.select({
native: "/enterInviteCode",
web: {
pathname: router.pathname,
query: {
...router.query,
enterInviteCodeModal: true,
},
} as any,
}),
Platform.select({
native: "/enterInviteCode",
web: router.asPath,
}),
{ shallow: true }
);
return;
}

Linking.openURL(
"https://www.notion.so/showtime-xyz/Showtime-xyz-Creator-Tokens-alpha-1-min-read-7f8b0c621e4442e98ec4c4189bec28df?pvs=4"
);
}, [
redirectToSelfServeExplainerModal,
router,
user?.user?.data.profile.creator_token_onboarding_status,
]);
if (
Expand Down Expand Up @@ -156,6 +182,9 @@ export const CreatorTokensBanner = ({
{user?.user?.data.profile.creator_token_onboarding_status ===
"allowlist"
? "You are eligible to launch your Creator Token. Get closer to your collectors."
: user?.user?.data.profile.creator_token_onboarding_status ===
"requires_invite"
? "Creator Tokens are live. Enter your invite code now."
: "Introducing Creator Tokens: a place for all your collectors."}
</Text>
</View>
Expand Down

0 comments on commit 66b0b56

Please sign in to comment.