@@ -20,7 +20,7 @@ interface Props {
2020type Tab = "profile" | "password" ;
2121
2222export 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