Skip to content

Commit

Permalink
fix: 프리미엄 구매 즉시 적용 안 되는 버그 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
dbwhdtjr0457 committed Dec 13, 2023
1 parent 7aa73aa commit b62b101
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion FE/src/components/PurchaseModal/PurchaseModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ import fourStar from "../../assets/fourstar.svg";
import diaryAtom from "../../atoms/diaryAtom";
import handleResponse from "../../utils/handleResponse";

function PurchaseModal() {
function PurchaseModal(props) {
const { premiumRefetch } = props;
const [userState, setUserState] = useRecoilState(userAtom);
const setDiaryState = useSetRecoilState(diaryAtom);
const [x, setX] = useState(0);
Expand Down Expand Up @@ -72,6 +73,7 @@ function PurchaseModal() {
onSuccessCallback: () => {
alert("구매가 완료되었습니다.");
creditRefetch();
premiumRefetch();
},
on400Callback: async () => {
alert((await res.json()).message);
Expand Down

0 comments on commit b62b101

Please sign in to comment.