Skip to content

Commit 73fbbbb

Browse files
committed
Improve profile menu
1 parent a33fa6e commit 73fbbbb

2 files changed

Lines changed: 19 additions & 17 deletions

File tree

apps/web/src/components/layout/Navbar.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ export default function Navbar() {
7676
}}
7777
>
7878
<Dropdown.Section>
79-
<Dropdown.Item id="profile" textValue="Profile">
79+
<Dropdown.Item id="profile" textValue="My Account">
8080
<HugeiconsIcon icon={UserIcon} size={16} />
81-
Profile
81+
My Account
8282
</Dropdown.Item>
8383
<Dropdown.Item id="settings" textValue="Settings">
8484
<HugeiconsIcon icon={Settings01Icon} size={16} />

apps/web/src/components/layout/ProfileModal.tsx

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ interface Props {
2020
type Tab = "profile" | "password";
2121

2222
export default function ProfileModal({ isOpen, onOpenChange }: Props) {
23-
const { user } = useAuthStore();
23+
const { user, cloud } = useAuthStore();
2424
const [tab, setTab] = useState<Tab>("profile");
2525
const [error, setError] = useState("");
2626
const [success, setSuccess] = useState("");
@@ -61,22 +61,24 @@ export default function ProfileModal({ isOpen, onOpenChange }: Props) {
6161
<Modal.Dialog className="sm:max-w-[420px]">
6262
<Modal.CloseTrigger />
6363
<Modal.Header>
64-
<Modal.Heading>Profile</Modal.Heading>
64+
<Modal.Heading>My Account</Modal.Heading>
6565
</Modal.Header>
6666
<Modal.Body>
67-
<div className="flex gap-1 p-1 rounded-xl bg-default mb-4">
68-
{(["profile", "password"] as Tab[]).map((t) => (
69-
<button
70-
key={t}
71-
onClick={() => { setTab(t); setError(""); setSuccess(""); }}
72-
className={`flex-1 py-1.5 rounded-lg text-xs font-medium transition-colors capitalize ${
73-
tab === t ? "bg-surface text-foreground shadow-sm" : "text-muted hover:text-foreground"
74-
}`}
75-
>
76-
{t === "profile" ? "Profile" : "Change Password"}
77-
</button>
78-
))}
79-
</div>
67+
{!cloud && (
68+
<div className="flex gap-1 p-1 rounded-xl bg-default mb-4">
69+
{(["profile", "password"] as Tab[]).map((t) => (
70+
<button
71+
key={t}
72+
onClick={() => { setTab(t); setError(""); setSuccess(""); }}
73+
className={`flex-1 py-1.5 rounded-lg text-xs font-medium transition-colors capitalize ${
74+
tab === t ? "bg-surface text-foreground shadow-sm" : "text-muted hover:text-foreground"
75+
}`}
76+
>
77+
{t === "profile" ? "Profile" : "Change Password"}
78+
</button>
79+
))}
80+
</div>
81+
)}
8082

8183
{tab === "profile" && (
8284
<div className="flex flex-col gap-3">

0 commit comments

Comments
 (0)