From 30495a6112772798bb3e94a623649f4afbc39a70 Mon Sep 17 00:00:00 2001 From: rbgksqkr Date: Fri, 6 Sep 2024 11:07:00 +0900 Subject: [PATCH 01/21] =?UTF-8?q?refactor:=20SelectButton=20=EC=BF=BC?= =?UTF-8?q?=EB=A6=AC=20=ED=98=B8=EC=B6=9C=20=EC=A0=9C=EA=B1=B0=ED=95=98?= =?UTF-8?q?=EA=B3=A0=20props=EB=A1=9C=20=EB=B0=9B=EA=B8=B0=20#261?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SelectContainer/SelectContainer.tsx | 1 + .../common/SelectButton/SelectButton.tsx | 18 +++++++++--------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/frontend/src/components/SelectContainer/SelectContainer.tsx b/frontend/src/components/SelectContainer/SelectContainer.tsx index 45d87f2ea..35771d583 100644 --- a/frontend/src/components/SelectContainer/SelectContainer.tsx +++ b/frontend/src/components/SelectContainer/SelectContainer.tsx @@ -36,6 +36,7 @@ const SelectContainer = () => { /> void; showModal: () => void; } -const SelectButton = ({ selectedId, completeSelection, showModal }: SelectButtonProps) => { - const { roomId } = useParams(); - const { balanceContent } = useBalanceContentQuery(Number(roomId)); +const SelectButton = ({ + contentId, + selectedId, + completeSelection, + showModal, +}: SelectButtonProps) => { const { data, isPending, mutate: completeSelectionMutate, } = useCompleteSelectionMutation({ selectedId, - contentId: balanceContent?.contentId, + contentId, completeSelection, showModal, }); @@ -29,7 +29,7 @@ const SelectButton = ({ selectedId, completeSelection, showModal }: SelectButton return (