From 984abf96737fddcfb269c4e1326fa9aca8aa9501 Mon Sep 17 00:00:00 2001 From: thgee Date: Thu, 15 Aug 2024 16:37:27 +0900 Subject: [PATCH] =?UTF-8?q?build:=20=EB=B9=8C=EB=93=9C=20=EC=98=A4?= =?UTF-8?q?=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/src/Demo/pages/ButtonDemoPage.tsx | 3 --- .../src/apis/lottery/apiGetLotteryStatus.ts | 15 +++++++++------ .../ClipBoardButton/ClipBoardButton.tsx | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/service/src/Demo/pages/ButtonDemoPage.tsx b/packages/service/src/Demo/pages/ButtonDemoPage.tsx index 4071930c..f15ea452 100644 --- a/packages/service/src/Demo/pages/ButtonDemoPage.tsx +++ b/packages/service/src/Demo/pages/ButtonDemoPage.tsx @@ -1,7 +1,6 @@ import { Button, ButtonVariant } from "@service/common/components/Button"; import { theme } from "@watermelon-clap/core/src/theme"; import { css } from "@emotion/react"; -import { ClipBoardButton } from "@service/common/components/ClipBoardButton"; import { CheckBox } from "@service/common/components/CheckBox"; import { useState } from "react"; import { ReactComponent as ClipBoardIcon } from "public/icons/clipboard.svg"; @@ -67,8 +66,6 @@ const ButtonDemoPage = () => { button - - => { - return customFetch( - `${import.meta.env.VITE_BACK_BASE_URL}/event/lotteries/rank`, - ).then((res) => res.json()); -}; +export const apiGetLotteryStatus = (): Promise => + customFetch(`${import.meta.env.VITE_BACK_BASE_URL}/event/lotteries/rank`, { + headers: { + Authorization: `Bearer ${getAccessToken()}`, + }, + }).then((res) => { + return res.json(); + }); diff --git a/packages/service/src/common/components/ClipBoardButton/ClipBoardButton.tsx b/packages/service/src/common/components/ClipBoardButton/ClipBoardButton.tsx index 10a9995b..5a0b35b0 100644 --- a/packages/service/src/common/components/ClipBoardButton/ClipBoardButton.tsx +++ b/packages/service/src/common/components/ClipBoardButton/ClipBoardButton.tsx @@ -9,7 +9,7 @@ import { import { ReactComponent as ClipBoardIcon } from "public/icons/clipboard.svg"; interface IClipBoardButton { - copyRef: React.MutableRefObject; + copyRef: any; } const ClipBoardButton = ({ copyRef }: IClipBoardButton) => { const [isCliped, setIsCliped] = useState(false); @@ -18,7 +18,7 @@ const ClipBoardButton = ({ copyRef }: IClipBoardButton) => { const handleCopy = () => { const textToCopy = copyRef?.current?.textContent; - navigator.clipboard.writeText(textToCopy); + navigator.clipboard.writeText(textToCopy as string); }; return (