Skip to content

Commit

Permalink
Merge pull request #17 from Nikitosiki/dev
Browse files Browse the repository at this point in the history
hotfix
  • Loading branch information
Nikitosiki authored Dec 27, 2023
2 parents 17e3f61 + 14e1cfc commit badd4a7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions client/src/modules/ProfileEditModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import { yupResolver } from "@hookform/resolvers/yup";
import { useForm } from "react-hook-form";
import { ProfileSchema, ProfileSchemaType } from "src/validations";
import { updateUserById } from "src/services/supabase/user";
import { useReload } from "src/hooks";

type ProfileModalProps = Pick<UseDisclosureReturn, "isOpen" | "onOpenChange">;
const ProfileEditModal: FC<ProfileModalProps> = ({ isOpen, onOpenChange }) => {
Expand All @@ -27,7 +26,6 @@ const ProfileEditModal: FC<ProfileModalProps> = ({ isOpen, onOpenChange }) => {
const [isLoading, setIsLoading] = useState(false);

const { user } = useAuth();
const { reload } = useReload();

const {
register,
Expand Down Expand Up @@ -96,8 +94,8 @@ const ProfileEditModal: FC<ProfileModalProps> = ({ isOpen, onOpenChange }) => {
if (!user) return;
updateUserById(user?.id, submitData.name, verifImageUrl).then((response) => {
if (response) {
reload();
closeAuthModal();
location.reload();
}
});
};
Expand Down

0 comments on commit badd4a7

Please sign in to comment.