Skip to content

Commit

Permalink
chore
Browse files Browse the repository at this point in the history
  • Loading branch information
SeungJL committed Sep 6, 2024
1 parent b3b2a89 commit 325e82e
Showing 1 changed file with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Box } from "@chakra-ui/react";
import { useRouter, useSearchParams } from "next/navigation";
import { useSession } from "next-auth/react";
import { useRouter, useSearchParams } from "next/navigation";
import { useRecoilValue } from "recoil";

import DateVoteBlock from "../../../../components/molecules/DateVoteBlock";
Expand All @@ -13,18 +13,18 @@ import { VoteType } from "./StudyController";

export type StudyVoteActionType =
| "참여 신청"
| "투표 변경"
| "출석 체크"
| "출석 완료"
| "스터디 투표하기"
| "스터디 출석체크"
| "출석체크 완료"
| "당일 불참"
| "기간 만료"
| "당일 참여";

export const ACTION_TO_VOTE_TYPE: Record<StudyVoteActionType, VoteType> = {
"참여 신청": "vote",
"투표 변경": "voteChange",
"출석 체크": "attendCheck",
"출석 완료": "attendCompleted",
"스터디 투표하기": "voteChange",
"스터디 출석체크": "attendCheck",
"출석체크 완료": "attendCompleted",
"당일 불참": "absent",
"기간 만료": "expired",
"당일 참여": "todayVote",
Expand Down Expand Up @@ -54,7 +54,7 @@ function StudyControllerVoteButton({ setModalType, memberCnt }: IStudyController
return;
}
const type = buttonProps.text;
if (type === "참여 신청" || type === "투표 변경") {
if (type === "참여 신청" || type === "스터디 투표하기") {
newSearchParams.delete("tab");
router.push(`/vote?${newSearchParams.toString()}`);
return;
Expand Down Expand Up @@ -86,7 +86,7 @@ export const getStudyVoteButtonProps = (
case "not passed":
if (myStudy)
return {
text: "투표 변경",
text: "스터디 투표하기",
color: "var(--color-mint)",
type: "active",
};
Expand All @@ -98,13 +98,13 @@ export const getStudyVoteButtonProps = (
case "today":
if (isAttend)
return {
text: "출석 완료",
text: "출석체크 완료",
color: "var(--color-orange)",
type: "inactive",
};
else if (myStudy)
return {
text: "출석 체크",
text: "스터디 출석체크",
color: "var(--color-orange)",
type: "active",
};
Expand All @@ -116,7 +116,7 @@ export const getStudyVoteButtonProps = (
case "passed":
if (myStudy && isAttend)
return {
text: "출석 완료",
text: "출석체크 완료",
color: "#F6AD55",
type: "inactive",
};
Expand Down

0 comments on commit 325e82e

Please sign in to comment.