Skip to content

Commit

Permalink
Merge commit '984abf96737fddcfb269c4e1326fa9aca8aa9501' into feat/CLA…
Browse files Browse the repository at this point in the history
…P-142
  • Loading branch information
thgee committed Aug 15, 2024
2 parents 918cd7f + 984abf9 commit e8f7bb6
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 14 deletions.
3 changes: 0 additions & 3 deletions packages/service/src/Demo/pages/ButtonDemoPage.tsx
Original file line number Diff line number Diff line change
@@ -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";
Expand Down Expand Up @@ -67,8 +66,6 @@ const ButtonDemoPage = () => {
button
</Button>

<ClipBoardButton />

<CheckBox
isChecked={isChecked1}
setIsChecked={setIsChecked1}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export const apiPostExpectation = (expectation: string) =>
expectation: expectation,
}),
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${getAccessToken()}`,
},
},
Expand Down
14 changes: 5 additions & 9 deletions packages/service/src/apis/lottery/apiGetLotteryStatus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,9 @@ interface IApiGetLotteryStatus {
applied: boolean;
}

export const apiGetLotteryStatus = (): Promise<IApiGetLotteryStatus> => {
return customFetch(
`${import.meta.env.VITE_BACK_BASE_URL}/event/lotteries/rank`,
{
headers: {
Authorization: `Bearer ${getAccessToken()}`,
},
export const apiGetLotteryStatus = (): Promise<IApiGetLotteryStatus> =>
customFetch(`${import.meta.env.VITE_BACK_BASE_URL}/event/lotteries/rank`, {
headers: {
Authorization: `Bearer ${getAccessToken()}`,
},
).then((res) => res.json());
};
}).then((res) => res.json());
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
import { ReactComponent as ClipBoardIcon } from "public/icons/clipboard.svg";

interface IClipBoardButton {
copyRef: React.MutableRefObject<null>;
copyRef: any;
}
const ClipBoardButton = ({ copyRef }: IClipBoardButton) => {
const [isCliped, setIsCliped] = useState<boolean>(false);
Expand All @@ -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 (
Expand Down

0 comments on commit e8f7bb6

Please sign in to comment.