Skip to content

Commit 5385f6b

Browse files
committed
Add Account Settings page (#4558)
## Problem solved Short description of the bug fixed or feature added <!-- start pr-codex --> --- ## PR-Codex overview This PR updates account and team-related UI components and settings pages. ### Detailed summary - Updated titles in account and team UI components - Added confirmation dialog to setting cards - Improved layout in account and team pages - Implemented account authentication logic > The following files were skipped due to too many changes: `apps/dashboard/src/app/team/[team_slug]/(team)/~/settings/general/GeneralSettingsPage.tsx`, `apps/dashboard/src/app/account/settings/AccountSettingsPageUI.tsx` > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent f092b2a commit 5385f6b

File tree

16 files changed

+567
-55
lines changed

16 files changed

+567
-55
lines changed

apps/dashboard/src/@/components/blocks/SidebarLayout.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { cn } from "../../lib/utils";
12
import { MobileSidebar } from "./MobileSidebar";
23
import { Sidebar, type SidebarLink } from "./Sidebar";
34

@@ -6,10 +7,16 @@ export function SidebarLayout(props: {
67
children: React.ReactNode;
78
desktopSidebarClassName?: string;
89
mobileSidebarClassName?: string;
10+
className?: string;
911
}) {
1012
const { sidebarLinks, children } = props;
1113
return (
12-
<div className="flex flex-col lg:flex-row gap-6 container px-4 w-full grow max-sm:pt-6">
14+
<div
15+
className={cn(
16+
"flex flex-col lg:flex-row gap-6 container px-4 w-full grow max-sm:pt-6",
17+
props.className,
18+
)}
19+
>
1320
<Sidebar links={sidebarLinks} className={props.desktopSidebarClassName} />
1421
<MobileSidebar
1522
links={sidebarLinks}

apps/dashboard/src/app/account/layout.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,15 @@ export default async function AccountLayout(props: {
1313
<div className="min-h-full flex flex-col bg-background">
1414
<div className="grow flex flex-col">
1515
<HeaderAndNav />
16+
<div className="py-10 border-b border-border">
17+
<div className="max-w-[1100px] mx-auto px-6">
18+
<h1 className="text-3xl tracking-tight font-semibold">
19+
My Account
20+
</h1>
21+
</div>
22+
</div>
1623
<SidebarLayout
24+
className="max-w-[1100px]"
1725
sidebarLinks={[
1826
{
1927
href: "/account",

apps/dashboard/src/app/account/overview/AccountTeamsUI.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { BadgeContainer, mobileViewport } from "../../../stories/utils";
44
import { AccountTeamsUI } from "./AccountTeamsUI";
55

66
const meta = {
7-
title: "Account/Teams",
7+
title: "Account/Pages/Teams",
88
component: Variants,
99
parameters: {
1010
nextjs: {
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
import type { Meta, StoryObj } from "@storybook/react";
2+
import { Toaster } from "sonner";
3+
import { ThirdwebProvider } from "thirdweb/react";
4+
import { mobileViewport } from "../../../stories/utils";
5+
import { AccountSettingsPageUI } from "./AccountSettingsPageUI";
6+
7+
const meta = {
8+
title: "Account/Pages/Settings",
9+
component: Variants,
10+
parameters: {
11+
nextjs: {
12+
appDirectory: true,
13+
},
14+
},
15+
} satisfies Meta<typeof Variants>;
16+
17+
export default meta;
18+
type Story = StoryObj<typeof meta>;
19+
20+
export const Desktop: Story = {
21+
args: {
22+
type: "desktop",
23+
},
24+
};
25+
26+
export const Mobile: Story = {
27+
args: {
28+
type: "mobile",
29+
},
30+
parameters: {
31+
viewport: mobileViewport("iphone14"),
32+
},
33+
};
34+
35+
function Variants() {
36+
return (
37+
<ThirdwebProvider>
38+
<div className="container py-10 max-w-[1132px] mx-auto w-full flex flex-col gap-10">
39+
<AccountSettingsPageUI
40+
account={{
41+
name: "John Doe",
42+
email: "johndoe@gmail.com",
43+
}}
44+
/>
45+
</div>
46+
<Toaster richColors />
47+
</ThirdwebProvider>
48+
);
49+
}

0 commit comments

Comments
 (0)