Skip to content

Commit 63c5277

Browse files
committed
Update Nebula Waitlist Page UI and invite link (#5485)
## Problem solved Short description of the bug fixed or feature added <!-- start pr-codex --> --- ## PR-Codex overview This PR enhances the `NebulaWaitListPageUI` and related components by adding a `teamId` prop to improve link sharing functionality. It modifies how the invite link is generated and displayed, allowing users to share a personalized link tied to their team. ### Detailed summary - Updated `Story` to pass `teamId="foo"` to `NebulaWaitListPageUI`. - Modified `NebulaWaitListPageUI` to accept `teamId` as a prop. - Enhanced `ShareButton` to accept `teamId` and generate a personalized invite link. - Changed tooltip label for the share button to "Copy Invite Link". - Updated footer in `NebulaWaitListPageUI` to include the personalized `ShareButton` and a message encouraging sharing. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent d665684 commit 63c5277

File tree

4 files changed

+21
-8
lines changed

4 files changed

+21
-8
lines changed

apps/dashboard/src/app/team/[team_slug]/[project_slug]/nebula/components/nebula-waitlist-page-ui.client.tsx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { OrbitIcon } from "lucide-react";
33
import Link from "next/link";
44
import { ShareButton } from "./share-button.client";
55

6-
export function NebulaWaitListPageUI() {
6+
export function NebulaWaitListPageUI(props: { teamId: string }) {
77
return (
88
<div className="flex grow flex-col">
99
{/* Header */}
@@ -22,7 +22,15 @@ export function NebulaWaitListPageUI() {
2222
<CenteredCard
2323
title="You're on the waitlist"
2424
description="You should receive access to Nebula soon!"
25-
footer={<ShareButton />}
25+
footer={
26+
<div className="flex flex-col items-center gap-3">
27+
<ShareButton teamId={props.teamId} />
28+
<p className="text-balance text-center text-muted-foreground">
29+
Share this invite link and get moved up the list when your
30+
friends sign up!
31+
</p>
32+
</div>
33+
}
2634
/>
2735
</div>
2836
</div>
@@ -82,7 +90,7 @@ function CenteredCard(props: {
8290
{props.description}
8391
</p>
8492

85-
<div className="h-6" />
93+
<div className="h-10" />
8694

8795
{props.footer}
8896
</div>

apps/dashboard/src/app/team/[team_slug]/[project_slug]/nebula/components/nebula-waitlist-page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export async function NebulaWaitListPage(props: {
3939
}
4040
}
4141

42-
return <NebulaWaitListPageUI />;
42+
return <NebulaWaitListPageUI teamId={team.id} />;
4343
}
4444

4545
function UnexpectedErrorPage(props: {

apps/dashboard/src/app/team/[team_slug]/[project_slug]/nebula/components/nebula-waitlist.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ export const Mobile: Story = {
2929
};
3030

3131
function Story() {
32-
return <NebulaWaitListPageUI />;
32+
return <NebulaWaitListPageUI teamId="foo" />;
3333
}

apps/dashboard/src/app/team/[team_slug]/[project_slug]/nebula/components/share-button.client.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,21 @@ import { ToolTipLabel } from "@/components/ui/tooltip";
55
import { CheckIcon, ShareIcon } from "lucide-react";
66
import { useState } from "react";
77

8-
export function ShareButton() {
8+
export function ShareButton(props: {
9+
teamId: string;
10+
}) {
911
const [isCopied, setIsCopied] = useState(false);
1012

1113
return (
12-
<ToolTipLabel label="Copy link for joining waitlist">
14+
<ToolTipLabel label="Copy Invite Link">
1315
<Button
1416
variant="outline"
1517
className="gap-2"
1618
onClick={() => {
17-
navigator.clipboard.writeText("https://thirdweb.com/team/~/~/nebula");
19+
const url = new URL("https://thirdweb.com/nebula");
20+
url.searchParams.append("utm_content", props.teamId);
21+
url.searchParams.append("utm_campaign", "nebula");
22+
navigator.clipboard.writeText(url.href);
1823
setIsCopied(true);
1924
setTimeout(() => setIsCopied(false), 1000);
2025
}}

0 commit comments

Comments
 (0)