Skip to content

Commit

Permalink
remove email button
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-hendrix committed Nov 12, 2023
1 parent ac51fa5 commit 069085c
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/components/EditProfileModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import TextInput from '@/components/TextInput'
import Modal from '@/components/Modal'
import FileUploadWrapper from './FileUploadWrapper'

type FormType = 'profile' | 'email' | 'password'
type FormType = 'profile' | 'password'
interface FormProps {
user: Partial<User>;
setOpen?: (open: boolean) => void;
Expand Down Expand Up @@ -56,10 +56,7 @@ const EditProfileForm: React.FC<FormProps> = ({ user, setOpen, setActiveForm })
<Avatar user={user} size={60} />
</div>
</FileUploadWrapper>
<div className="flex flex-col ml-2">
<button className="link link-primary mb-2 text-right link-hover" onClick={() => setActiveForm('email')}>Update email</button>
<button className="link link-primary text-right link-hover" onClick={() => setActiveForm('password')}>Change password</button>
</div>
<button className="link link-primary text-right link-hover" onClick={() => setActiveForm('password')}>Change password</button>
</div>
<form className="mt-4" onSubmit={form.handleSubmit(onSubmit)}>
<TextInput name="email" form={form} disabled={true} />
Expand Down Expand Up @@ -146,7 +143,6 @@ const EditProfileModal: React.FC<ModalProps> = ({ user, setOpen }) => {

const forms = {
profile: <EditProfileForm user={user} setOpen={setOpen} setActiveForm={setActiveForm} />,
email: <>TODO</>, // TODO
password: <EditPasswordForm user={user} setActiveForm={setActiveForm} />
}

Expand Down

0 comments on commit 069085c

Please sign in to comment.