Skip to content

Commit d0a0d64

Browse files
committed
fix: account page reuse the sidebar
1 parent adc7caa commit d0a0d64

File tree

1 file changed

+17
-31
lines changed
  • apps/dashboard/app/(main)/settings/account

1 file changed

+17
-31
lines changed

apps/dashboard/app/(main)/settings/account/page.tsx

Lines changed: 17 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import {
3030
import { Input } from "@/components/ui/input";
3131
import { Label } from "@/components/ui/label";
3232
import { Skeleton } from "@/components/ui/skeleton";
33+
import { RightSidebar } from "@/components/right-sidebar";
3334
import { UnsavedChangesFooter } from "../_components/settings-section";
3435
import { TwoFactorDialog } from "./sections/two-factor-dialog";
3536

@@ -275,18 +276,18 @@ export default function AccountSettingsPage() {
275276
const isLoading = isSessionLoading || isAccountsLoading;
276277

277278
return (
278-
<div className="flex h-full flex-col lg:grid lg:grid-cols-[1fr_18rem]">
279+
<div className="h-full lg:grid lg:grid-cols-[1fr_18rem]">
279280
<div className="flex min-h-0 flex-1 flex-col">
280281
<div className="flex-1 overflow-y-auto">
281282
{/* Row 1: Profile Photo + Account Status */}
282283
<div className="grid grid-cols-1 lg:contents">
283-
<section className="border-b px-5 py-6 lg:border-r">
284+
<section className="border-b px-5 py-6">
284285
<div className="mb-4">
285286
<h3 className="font-semibold text-sm">Profile Photo</h3>
286287
<p className="text-muted-foreground text-xs">
287288
Upload a photo to personalize your account
288289
</p>
289-
</div>
290+
</div>
290291
{isLoading ? (
291292
<div className="flex items-center gap-4">
292293
<Skeleton className="size-20 rounded-full" />
@@ -322,7 +323,7 @@ export default function AccountSettingsPage() {
322323

323324
{/* Row 2: Basic Info + Connected Apps */}
324325
<div className="grid grid-cols-1 lg:contents">
325-
<section className="border-b px-5 py-6 lg:border-r">
326+
<section className="border-b px-5 py-6">
326327
<div className="mb-4">
327328
<h3 className="font-semibold text-sm">Basic Information</h3>
328329
<p className="text-muted-foreground text-xs">
@@ -364,7 +365,7 @@ export default function AccountSettingsPage() {
364365

365366
{/* Row 3: Security */}
366367
<div className="grid grid-cols-1 lg:contents">
367-
<section className="border-b px-5 py-6 lg:border-r">
368+
<section className="border-b px-5 py-6">
368369
<div className="mb-4">
369370
<h3 className="font-semibold text-sm">Security</h3>
370371
<p className="text-muted-foreground text-xs">
@@ -415,7 +416,7 @@ export default function AccountSettingsPage() {
415416

416417
{/* Row 4: Connected Identities */}
417418
<div className="grid grid-cols-1 lg:contents">
418-
<section className="px-5 py-6 lg:border-r">
419+
<section className="px-5 py-6">
419420
<div className="mb-4">
420421
<h3 className="font-semibold text-sm">Connected Identities</h3>
421422
<p className="text-muted-foreground text-xs">
@@ -511,13 +512,8 @@ export default function AccountSettingsPage() {
511512
/>
512513
</div>
513514

514-
{/* Right Sidebar - synced with main content */}
515-
<div className="hidden border-l lg:block">
516-
{/* Account Status - synced with Profile Photo row */}
517-
<section className="border-b px-4 py-6">
518-
<h4 className="mb-3 font-medium text-muted-foreground text-xs uppercase tracking-wider">
519-
Account Status
520-
</h4>
515+
<RightSidebar className="gap-0 p-0">
516+
<RightSidebar.Section border title="Account Status">
521517
{isLoading ? (
522518
<div className="space-y-2.5">
523519
<Skeleton className="h-5 w-full" />
@@ -554,13 +550,9 @@ export default function AccountSettingsPage() {
554550
</div>
555551
</div>
556552
)}
557-
</section>
553+
</RightSidebar.Section>
558554

559-
{/* Connected Apps - synced with Basic Info row */}
560-
<section className="border-b px-4 py-6">
561-
<h4 className="mb-3 font-medium text-muted-foreground text-xs uppercase tracking-wider">
562-
Connected Apps
563-
</h4>
555+
<RightSidebar.Section border title="Connected Apps">
564556
{isAccountsLoading ? (
565557
<div className="space-y-2">
566558
<Skeleton className="h-5 w-full" />
@@ -583,18 +575,12 @@ export default function AccountSettingsPage() {
583575
})}
584576
</div>
585577
)}
586-
</section>
587-
588-
{/* Tips - fills remaining space */}
589-
<section className="px-4 py-6">
590-
<div className="rounded border border-dashed bg-accent/30 p-3">
591-
<p className="text-muted-foreground text-xs">
592-
Keep your email up to date to ensure you receive important
593-
notifications about your account.
594-
</p>
595-
</div>
596-
</section>
597-
</div>
578+
</RightSidebar.Section>
579+
580+
<RightSidebar.Section>
581+
<RightSidebar.Tip description="Keep your email up to date to ensure you receive important notifications about your account." />
582+
</RightSidebar.Section>
583+
</RightSidebar>
598584

599585
{/* Dialogs */}
600586
<ChangePasswordDialog

0 commit comments

Comments
 (0)