diff --git a/packages/adminPage/build.js b/packages/adminPage/build.js index 806d1130..ba07dbb8 100644 --- a/packages/adminPage/build.js +++ b/packages/adminPage/build.js @@ -17,7 +17,7 @@ const buildUrl = [ "events/[id]", "comments", "comments/[id]", - "users" + "users", ]; async function copyFolder(src, dest) { diff --git a/packages/adminPage/src/features/eventDetail/drawButton/DrawButton.jsx b/packages/adminPage/src/features/eventDetail/drawButton/DrawButton.jsx index bb11692e..90061937 100644 --- a/packages/adminPage/src/features/eventDetail/drawButton/DrawButton.jsx +++ b/packages/adminPage/src/features/eventDetail/drawButton/DrawButton.jsx @@ -1,9 +1,9 @@ +import { useState, useEffect, useRef } from "react"; import { useParams } from "react-router-dom"; import { fetchServer } from "@common/dataFetch/fetchServer.js"; -import { useQuery, useMutation } from "@common/dataFetch/getQuery.js"; + import Button from "@common/components/Button.jsx"; import openModal from "@common/modal/openModal.js"; - import AlertModal from "@admin/modals/AlertModal.jsx"; import DrawResultModal from "./DrawResultModal.jsx"; @@ -12,17 +12,8 @@ import Suspense from "@common/components/Suspense.jsx"; import Spinner from "@common/components/Spinner.jsx"; import DelaySkeleton from "@common/components/DelaySkeleton.jsx"; -function DrawButton() { - const { eventId } = useParams(); - const drawResultData = useQuery( - `event-detail-draw-result-${eventId}`, - () => { - return fetchServer(`/api/v1/admin/draw/${eventId}/winners`); - }, - { deferred: true }, - ); - - const resultModal = ( +function ResultModalContainer({ eventId }) { + return (