Skip to content

Commit 62de6dd

Browse files
committed
[TOOL-3684] Dashboard: Add FTUX in project overview page (#6466)
<!-- ## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes" If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000): ## Notes for the reviewer Anything important to call out? Be sure to also clarify these in your comments. ## How to test Unit tests, playground, etc. --> <!-- start pr-codex --> --- ## PR-Codex overview This PR introduces several enhancements and fixes across various components in the dashboard application, including new features, property adjustments, and structural changes for improved functionality and usability. ### Detailed summary - Added `showRangeSelector` property to `AnalyticsHeader`. - Updated `RotateSecretKeyButton` to be exported. - Removed `isEnabled` property and replaced it with `isDisabled` across multiple components. - Introduced `IntegrateAPIKeyCodeTabs` and related sections in `ProjectFTUX`. - Enhanced project integration sections with new UI components and improved code examples. - Refactored `NotificationButtonInner` and other components to remove `isEnabled` checks. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent 6fc6c6e commit 62de6dd

File tree

22 files changed

+649
-29
lines changed

22 files changed

+649
-29
lines changed

apps/dashboard/.storybook/main.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,8 @@ const config: StorybookConfig = {
2727
},
2828
},
2929
staticDirs: ["../public"],
30+
features: {
31+
experimentalRSC: true,
32+
},
3033
};
3134
export default config;

apps/dashboard/src/@/components/blocks/code-segment.client.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ export const CodeSegment: React.FC<CodeSegmentProps> = ({
9696
onClick: () => setEnvironment(env.environment),
9797
isActive: activeEnvironment === env.environment,
9898
name: env.title,
99-
isEnabled: true,
10099
}))}
101100
tabClassName="text-sm gap-2 !text-sm"
102101
tabIconClassName="size-4"

apps/dashboard/src/@/components/ui/DatePickerWithRange.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,11 @@ export function DatePickerWithRange(props: {
9191
name: "From",
9292
onClick: () => setScreen("from"),
9393
isActive: screen === "from",
94-
isEnabled: true,
9594
},
9695
{
9796
name: "To",
9897
onClick: () => setScreen("to"),
9998
isActive: screen === "to",
100-
isEnabled: true,
10199
},
102100
]}
103101
/>

apps/dashboard/src/@/components/ui/tabs.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export function TabButtons(props: {
7979
name: React.ReactNode;
8080
onClick: () => void;
8181
isActive: boolean;
82-
isEnabled?: boolean;
82+
isDisabled?: boolean;
8383
icon?: React.FC<{ className?: string }>;
8484
}[];
8585
tabClassName?: string;
@@ -119,11 +119,11 @@ export function TabButtons(props: {
119119
"relative inline-flex h-auto items-center gap-1.5 rounded-lg px-2 font-medium text-sm hover:bg-accent lg:px-3 lg:text-base",
120120
!tab.isActive &&
121121
"text-muted-foreground hover:text-foreground",
122-
!tab.isEnabled && "cursor-not-allowed opacity-50",
122+
tab.isDisabled && "cursor-not-allowed opacity-50",
123123
props.tabClassName,
124124
tab.isActive && props.activeTabClassName,
125125
)}
126-
onClick={tab.isEnabled ? tab.onClick : undefined}
126+
onClick={!tab.isDisabled ? tab.onClick : undefined}
127127
>
128128
{tab.icon && (
129129
<tab.icon className={cn("size-6", props.tabIconClassName)} />

apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/components/list-button.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ export const CreateListingButton: React.FC<CreateListingButtonProps> = ({
7171
name: mode,
7272
isActive: mode === listingMode,
7373
onClick: () => setListingMode(mode),
74-
isEnabled: true,
7574
}))}
7675
tabClassName="text-sm gap-2 !text-sm"
7776
tabContainerClassName="gap-0.5"

apps/dashboard/src/app/account/contracts/_components/GetStartedWithContractsDeploy.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ const DeployOptions = (props: {
100100
key,
101101
name: value.title,
102102
isActive: activeTab === key,
103-
isEnabled: true,
104103
onClick: () => setActiveTab(key as TabId),
105104
}))}
106105
tabClassName="font-medium"

apps/dashboard/src/app/login/onboarding/LoginOrSignup/LoginOrSignup.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,11 @@ export function LoginOrSignup(props: {
8989
name: "Create account",
9090
onClick: () => setTab("signup"),
9191
isActive: tab === "signup",
92-
isEnabled: true,
9392
},
9493
{
9594
name: "I already have an account",
9695
onClick: () => setTab("login"),
9796
isActive: tab === "login",
98-
isEnabled: true,
9997
},
10098
]}
10199
/>

apps/dashboard/src/app/login/onboarding/team-onboarding/InviteTeamMembers.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,13 +227,11 @@ function InviteModalContent(props: {
227227
name: "Starter",
228228
onClick: () => setPlanToShow("starter"),
229229
isActive: planToShow === "starter",
230-
isEnabled: true,
231230
},
232231
{
233232
name: "Growth",
234233
onClick: () => setPlanToShow("growth"),
235234
isActive: planToShow === "growth",
236-
isEnabled: true,
237235
},
238236
]}
239237
/>

apps/dashboard/src/app/login/onboarding/team-onboarding/team-onboarding.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
"use client";
22

33
import { getBillingCheckoutUrl } from "@/actions/billing";
4+
import { apiServerProxy } from "@/actions/proxies";
45
import { sendTeamInvites } from "@/actions/sendTeamInvite";
56
import type { Team } from "@/api/team";
67
import { useDashboardRouter } from "@/lib/DashboardRouter";
78
import { toast } from "sonner";
89
import type { ThirdwebClient } from "thirdweb";
910
import { upload } from "thirdweb/storage";
10-
import { apiServerProxy } from "../../../../@/actions/proxies";
1111
import { useTrack } from "../../../../hooks/analytics/useTrack";
1212
import { updateTeam } from "../../../team/[team_slug]/(team)/~/settings/general/updateTeam";
1313
import { InviteTeamMembersUI } from "./InviteTeamMembers";

apps/dashboard/src/app/team/[team_slug]/(team)/~/analytics/page.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,12 @@ export default async function TeamOverviewPage(props: {
6363
return (
6464
<div className="flex grow flex-col">
6565
<div className="border-b">
66-
<AnalyticsHeader title="Analytics" interval={interval} range={range} />
66+
<AnalyticsHeader
67+
title="Analytics"
68+
interval={interval}
69+
range={range}
70+
showRangeSelector={true}
71+
/>
6772
</div>
6873
<div className="flex grow flex-col justify-between gap-10 md:container md:pt-8 md:pb-16">
6974
<Suspense fallback={<GenericLoadingPage />}>

0 commit comments

Comments
 (0)