Skip to content

Commit

Permalink
Merge pull request #17 from sumi-0011/fix/point-gotcha
Browse files Browse the repository at this point in the history
๋ฝ‘๊ธฐ ํ›„ ํฌ์ธํŠธ ๋‚ด๋ ค๊ฐ€์ง€ ์•Š๋Š” ๋ฌธ์ œ ์ˆ˜์ •
  • Loading branch information
sumi-0011 authored Jun 5, 2024
2 parents a68b9ef + 528c96a commit 628bd9e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/pages/shop/GotchaSection.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { useState } from 'react';
import Image from 'next/image';
import { useQueryClient } from '@tanstack/react-query';
import Lottie from 'lottie-react';
import styled from 'styled-components';

Expand All @@ -9,12 +10,18 @@ import { getPersonaImage } from '@/utils/image';
import Congratulations from './congratulations.json';

function GotchaSection() {
const queryClient = useQueryClient();
const [gotchaVisible, setGotchaVisible] = useState(false);
const [isBounce, setIsBounce] = useState(false);

const { mutate, data, isPending } = useGotcha({
onSuccess: () => {
setGotchaVisible(true);
// TODO : ํฌ์ธํŠธ ๋‚ด๋ ค๊ฐ€๋Š” ์• ๋‹ˆ๋งค์ด์…˜์„ ใ„ดํ—ˆ์–ด๋ณผ๊นŒ
queryClient.invalidateQueries({
queryKey: ['user'], // TODO: user query key
});

const timer = setTimeout(() => {
setGotchaVisible(false);
clearTimeout(timer);
Expand Down

0 comments on commit 628bd9e

Please sign in to comment.