Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
SeungJL committed Sep 24, 2024
1 parent 236fb3f commit 547d493
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modals/pop-up/LocationRegisterPopUp.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { Box } from "@chakra-ui/react";
import { useState } from "react";
import { useQueryClient } from "react-query";

import SearchLocation from "../../components/organisms/SearchLocation";
import { USER_INFO } from "../../constants/keys/queryKeys";
import { useToast } from "../../hooks/custom/CustomToast";
import { useUserInfoFieldMutation } from "../../hooks/user/mutations";
import { ModalSubtitle } from "../../styles/layout/modal";
Expand All @@ -18,9 +20,11 @@ function LocationRegisterPopUp({ setIsModal }: LocationRegisterPopUp) {
road_address_name: "",
});

const queryClient = useQueryClient();
const { mutate } = useUserInfoFieldMutation("locationDetail", {
onSuccess() {
toast("success", "등록되었습니다. 이후 연락을 기다려주세요!");
queryClient.invalidateQueries([USER_INFO]);
setIsModal(false);
},
onError() {
Expand Down

0 comments on commit 547d493

Please sign in to comment.