Skip to content

Commit 420b367

Browse files
committed
feat: adds storybook for project header
1 parent 642b793 commit 420b367

File tree

3 files changed

+63
-13
lines changed

3 files changed

+63
-13
lines changed

apps/dashboard/src/app/team/[team_slug]/[project_slug]/components/EmptyState.tsx

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import walletsIcon from "../../../../../../public/assets/tw-icons/wallets.svg";
1313
import socialAuthIcon from "../../../../../../public/assets/tw-icons/social-auth.svg";
1414
import Image, { StaticImageData } from "next/image";
1515
import { cn } from "@/lib/utils";
16+
import Link from "next/link";
1617

1718
export function EmptyState() {
1819
return (
@@ -22,50 +23,57 @@ export function EmptyState() {
2223
<AnimatedIcons />
2324
<div className="text-center flex flex-col gap-0.5">
2425
<h3 className="text-2xl font-semibold text-foreground">
25-
Get started with the Connect SDK
26+
Project Overview is Coming Soon
2627
</h3>
2728
<p className="text-muted-foreground text-base">
28-
Add the Connect SDK to your app to start collecting analytics.
29+
Understand how usees are interacting with your project in a
30+
glance.
2931
</p>
3032
</div>
3133
<div className="flex flex-wrap gap-2 justify-center items-center">
3234
<SDKBadge
3335
icon={TypeScriptIcon}
3436
label="TypeScript"
35-
href="https://portal.thirdweb.com/typescript/v5/inAppWallet"
37+
href="https://portal.thirdweb.com/typescript/v5"
3638
/>
3739
<SDKBadge
3840
icon={ReactIcon}
3941
label="React"
40-
href="https://portal.thirdweb.com/react/v5/in-app-wallet/get-started"
42+
href="https://portal.thirdweb.com/react/v5"
4143
/>
4244
<SDKBadge
4345
icon={ReactIcon}
4446
label="React Native"
45-
href="https://portal.thirdweb.com/react/v5/in-app-wallet/get-started"
47+
href="https://portal.thirdweb.com/react-native/v5"
4648
/>
4749
<SDKBadge
4850
icon={UnityIcon}
4951
label="Unity"
50-
href="https://portal.thirdweb.com/unity/v5/wallets/in-app-wallet"
52+
href="https://portal.thirdweb.com/unity/v5"
5153
/>
5254
<SDKBadge
5355
icon={UnrealIcon}
5456
label="Unreal"
55-
href="https://portal.thirdweb.com/unreal-engine/getting-started"
57+
href="https://portal.thirdweb.com/unreal-engine"
5658
/>
5759
<SDKBadge
5860
icon={DotNetIcon}
5961
label=".NET"
60-
href="https://portal.thirdweb.com/flutter/v5/in-app-wallet/get-started"
62+
href="https://portal.thirdweb.com/dotnet"
6163
/>
6264
</div>
6365
</div>
6466
<div className="flex gap-2">
65-
<Button variant="outline">View Docs</Button>
66-
<Button variant="primary">
67-
Get Started
68-
<ArrowRightIcon className="size-4 ml-2" />
67+
<Button variant="outline" asChild>
68+
<Link href="https://portal.thirdweb.com/connect" target="_blank">
69+
View Docs
70+
</Link>
71+
</Button>
72+
<Button asChild variant="primary">
73+
<Link href="https://thirdweb.com/dashboard/settings/api-keys">
74+
Get Started
75+
<ArrowRightIcon className="size-4 ml-2" />
76+
</Link>
6977
</Button>
7078
</div>
7179
</div>
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import type { Meta, StoryObj } from "@storybook/react";
2+
import { projectStub } from "stories/stubs";
3+
import { BadgeContainer, mobileViewport } from "stories/utils";
4+
import { ProjectOverviewHeader } from "./ProjectOverviewHeader";
5+
6+
const meta = {
7+
title: "project/Overview/Header",
8+
component: Component,
9+
parameters: {
10+
layout: "centered",
11+
},
12+
} satisfies Meta<typeof Component>;
13+
14+
export default meta;
15+
type Story = StoryObj<typeof meta>;
16+
17+
export const Desktop: Story = {
18+
parameters: {
19+
nextjs: {
20+
appDirectory: true,
21+
},
22+
},
23+
};
24+
25+
export const Mobile: Story = {
26+
parameters: {
27+
nextjs: {
28+
appDirectory: true,
29+
},
30+
viewport: mobileViewport("iphone14"),
31+
},
32+
};
33+
34+
function Component() {
35+
return (
36+
<div className="container max-w-[1150px] py-8">
37+
<BadgeContainer label="Base">
38+
<ProjectOverviewHeader project={projectStub("123", "456")} />
39+
</BadgeContainer>
40+
</div>
41+
);
42+
}

apps/dashboard/src/stories/stubs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import type {
1515
} from "@3rdweb-sdk/react/hooks/useEngine";
1616
import { ZERO_ADDRESS } from "thirdweb";
1717

18-
function projectStub(id: string, teamId: string) {
18+
export function projectStub(id: string, teamId: string) {
1919
const project: Project = {
2020
bundleIds: [] as string[],
2121
createdAt: new Date(),

0 commit comments

Comments
 (0)