diff --git a/scenes/Profile/components/ProfileModal.tsx b/scenes/Profile/components/ProfileModal.tsx index 8d11af224..d9cca4005 100644 --- a/scenes/Profile/components/ProfileModal.tsx +++ b/scenes/Profile/components/ProfileModal.tsx @@ -68,7 +68,6 @@ const sensToString = (sens: number | undefined | null) => { }; interface Props { - isOpen: boolean; onClose: () => void; existingProfile?: NonNullable< GetUserByIdentifierQuery["getUserByIdentifier"] @@ -77,11 +76,7 @@ interface Props { type FormData = z.infer; -const ProfileModal: React.FC = ({ - isOpen, - onClose, - existingProfile, -}) => { +const ProfileModal: React.FC = ({ onClose, existingProfile }) => { const { t } = useTranslation(); const { handleSubmit, errors, register, watch, control } = useForm({ @@ -154,12 +149,7 @@ const ProfileModal: React.FC = ({ }; return ( - + {t("users;Editing profile")} diff --git a/scenes/Profile/index.tsx b/scenes/Profile/index.tsx index b3e1163ea..b2cf852b4 100644 --- a/scenes/Profile/index.tsx +++ b/scenes/Profile/index.tsx @@ -25,11 +25,12 @@ const Profile: React.FC = ({ user }) => { {t("users;Edit profile")} )} - setShowModal(false)} - existingProfile={user.profile} - /> + {showModal && ( + setShowModal(false)} + existingProfile={user.profile} + /> + )} {user.profile?.bio && (