Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 21 additions & 3 deletions src/components/Card/CardWaitlistJoinedScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { PeanutWhistling } from '@/assets/mascot'
import { useRouter } from 'next/navigation'
import posthog from 'posthog-js'
import { ANALYTICS_EVENTS } from '@/constants/analytics.consts'
import { pickRejectionCaption } from '@/components/Card/share-asset/rejectionCaptions'

interface Props {
onPrev?: () => void
Expand All @@ -33,6 +34,18 @@ const CardWaitlistJoinedScreen: FC<Props> = ({ onPrev }) => {
posthog.capture(ANALYTICS_EVENTS.CARD_WAITLIST_VIEWED, { already_joined: true })
}, [])

// Beg to jump the queue — the same appeal as the rejection screen, minus the
// waitlist-join (they're already on the list). Text-only X intent tagging
// @joinpeanut; no asset to capture on the friendly cooldown screen.
const handleAppeal = (): void => {
const caption = pickRejectionCaption()
posthog.capture(ANALYTICS_EVENTS.CARD_SHARE_ASSET_SHARED, {
source: 'waitlist-cooldown',
method: 'twitter-intent',
})
window.open(`https://twitter.com/intent/tweet?text=${encodeURIComponent(caption)}`, '_blank', 'noopener')
}

return (
<div className="flex min-h-[inherit] flex-col gap-6">
<NavHeader title="Peanut Card" onPrev={onPrev} />
Expand All @@ -59,9 +72,14 @@ const CardWaitlistJoinedScreen: FC<Props> = ({ onPrev }) => {
</Card>
</div>

<Button onClick={() => router.push('/home')} variant="purple" shadowSize="4" className="w-full">
Back to home
</Button>
<div className="flex flex-col gap-3">
<Button onClick={handleAppeal} variant="purple" shadowSize="4" className="w-full">
Tweet to appeal
</Button>
<Button onClick={() => router.push('/home')} variant="stroke" className="w-full">
Back to home
</Button>
</div>
</div>
)
}
Expand Down
Loading