diff --git a/components/molecules/groups/ButtonGroups.tsx b/components/molecules/groups/ButtonGroups.tsx index b2fc08987..e87e014df 100644 --- a/components/molecules/groups/ButtonGroups.tsx +++ b/components/molecules/groups/ButtonGroups.tsx @@ -24,7 +24,6 @@ export default function ButtonGroups({ isEllipse = false, type = "block", }: IButtonGroups) { - console.log(buttonOptionsArr, currentValue); return ( {buttonOptionsArr.map((buttonOptions, idx) => ( diff --git a/components/organisms/Calendar.tsx b/components/organisms/Calendar.tsx index 38d8353b0..318c84787 100644 --- a/components/organisms/Calendar.tsx +++ b/components/organisms/Calendar.tsx @@ -63,9 +63,10 @@ function Calendar({ monthFirstDate, calendarContents }: CalendarProps) { const isFirstDay = date === schedule.start; const isEndDay = date === schedule.end; if (schedule.start <= date && date <= schedule.end) { + acc.push({ content: schedule.content, - color: SCHEDULE_TYPE_TO_COLOR[schedule.type], + color: schedule?.color || SCHEDULE_TYPE_TO_COLOR[schedule.type], isFirst: isFirstDay, isLast: isEndDay, blockIdx: schedule?.blockIdx, @@ -118,9 +119,11 @@ function Calendar({ monthFirstDate, calendarContents }: CalendarProps) { const day = idx % 7 === 0 ? "sun" : idx % 7 === 6 ? "sat" : null; const isToday = monthFirstDate.date(item).isSame(dayjs(), "day"); const contentArr = getDaySchedules(item); - const dateInfo = Object.values(daySchedules).map((title) => - contentArr?.find((c) => c.content === title), - ); + + const dateInfo = Object.values(daySchedules).map((title, index) => { + const matchedContents = contentArr.filter((c) => c.content === title); + return matchedContents[index]; // 순서를 고려하여 index에 해당하는 요소를 선택 + }); endingSchedules.forEach((item) => deleteSchedule(item)); endingSchedules = []; @@ -160,6 +163,7 @@ function Calendar({ monthFirstDate, calendarContents }: CalendarProps) { <> {dateInfo.map((item, idx2) => { + return ( (props.isFirst ? 4 : 0)}; padding-left: ${(props) => (props.isFirst ? "var(--gap-1)" : 0)}; padding-right: ${(props) => (props.isLast ? "var(--gap-1)" : 0)}; + text-align: ${(props) => props.isFirst && props.isLast && "center"}; `; export default Calendar; diff --git a/constants/contents/calendarSchedule.ts b/constants/contents/calendarSchedule.ts index 0ec4e6421..bd76ef0aa 100644 --- a/constants/contents/calendarSchedule.ts +++ b/constants/contents/calendarSchedule.ts @@ -2,9 +2,10 @@ export interface CalendarContentProps { content: string; start: number; end: number; - type: "event" | "schedule" | "main"; + type?: "event" | "schedule" | "main"; text?: string; blockIdx?: number; + color?: string; } export const EVENT_CONTENT_2023: Record = { @@ -294,12 +295,19 @@ export const EVENT_CONTENT_2024: Record = { text: "", }, { - content: "지역 정기 스터디 주간", + content: "조모임 진행 주간", start: 26, end: 29, type: "schedule", text: "", }, + { + content: "시험대비 스터디 집중 ~ ", + start: 29, + end: 30, + type: "main", + text: "", + }, { content: "ABOUT 빙고판 이벤트", start: 17, diff --git a/modals/pop-up/LastWeekAttendPopUp.tsx b/modals/pop-up/LastWeekAttendPopUp.tsx index 48ac55f38..bbda03a8b 100644 --- a/modals/pop-up/LastWeekAttendPopUp.tsx +++ b/modals/pop-up/LastWeekAttendPopUp.tsx @@ -41,7 +41,7 @@ function LastWeekAttendPopUp({ setIsModal }: IModal) { ); const totalScore = scoreObj?.study + scoreObj?.gather; - console.log(2, filteredData, scoreObj); + const footerOptions: IFooterOptions = { main: {}, sub: { diff --git a/pageTemplates/home/HomeCalendarSection.tsx b/pageTemplates/home/HomeCalendarSection.tsx index 62fce4a87..d12547e84 100644 --- a/pageTemplates/home/HomeCalendarSection.tsx +++ b/pageTemplates/home/HomeCalendarSection.tsx @@ -36,7 +36,6 @@ function HomeCalendarSection() { <> - diff --git a/pageTemplates/home/study/HomeStudyChart.tsx b/pageTemplates/home/study/HomeStudyChart.tsx index f5768632d..c841a4f9e 100644 --- a/pageTemplates/home/study/HomeStudyChart.tsx +++ b/pageTemplates/home/study/HomeStudyChart.tsx @@ -5,7 +5,6 @@ import dynamic from "next/dynamic"; import HighlightedTextButton from "../../../components/atoms/buttons/HighlightedTextButton"; import SectionBar from "../../../components/molecules/bars/SectionBar"; import { ChartStudyOptions } from "../../../components/organisms/chart/ChartOptions"; -import { useToast } from "../../../hooks/custom/CustomToast"; import { VoteCntProps } from "../../../types/models/studyTypes/studyRecords"; interface HomeStudyChartProps { @@ -13,8 +12,6 @@ interface HomeStudyChartProps { } function HomeStudyChart({ voteCntArr }: HomeStudyChartProps) { - // const router = useRouter(); - const toast = useToast(); const ApexCharts = dynamic(() => import("react-apexcharts"), { ssr: false }); const filtered: VoteCntProps[] = voteCntArr?.reduce((acc, cur) => { @@ -36,15 +33,11 @@ function HomeStudyChart({ voteCntArr }: HomeStudyChartProps) { xArr.push(dayjs(obj.date).date() + ""); }); - const onClick = () => { - toast("warning", "24년 9월 5일 오픈"); - }; - return ( <> } + rightComponent={} /> { const arrivedInfo = data?.arrivedInfoList; const date = data?.date; @@ -36,18 +35,19 @@ function RecordCalendar({ filterData, monthFirstDate }: IRecordCalendar) { cnt: place.arrivedInfo.length, }); }); - console.log(24, arrivedInfo, openLocation, openStudyLocation); - let tempCnt = 0; + let tempCnt = 0; + const resData = Array.from(openStudyLocation) .map((location, idx) => { if (idx > 2 || location.cnt < 2) return null; tempCnt++; + return { - content: "오픈", + content: "스터디", start: date, end: date, - type: "main" as "main" | "event" | "schedule", + color: LOCATION_TO_COLOR[location.location], blockIdx: tempCnt - 1, }; }) @@ -69,7 +69,7 @@ function RecordCalendar({ filterData, monthFirstDate }: IRecordCalendar) { // }); // } }); - console.log(calendarContents); + return ( { const filteredArrived = item?.arrivedInfoList.filter( - (place) => PLACE_TO_LOCATION[place?.placeId] === category, + (place) => + place?.placeId !== ALL_스터디인증 && PLACE_TO_LOCATION[place?.placeId] === category, ); if (!filteredArrived) return; return { ...item, arrivedInfoList: filteredArrived }; @@ -50,7 +52,7 @@ function RecordLocationCategory({ initialData, setFilterData }: IRecordLocationC > diff --git a/pages/calendar/index.tsx b/pages/calendar/index.tsx index d096d12ce..07e237a5b 100644 --- a/pages/calendar/index.tsx +++ b/pages/calendar/index.tsx @@ -36,7 +36,7 @@ function Record() { setFilterData(arrivedCalendar); setIsLoading(false); }, [arrivedCalendar]); - + return ( <>
diff --git a/pages/gather/writing/condition.tsx b/pages/gather/writing/condition.tsx index c6a5865d1..beedcfd7c 100644 --- a/pages/gather/writing/condition.tsx +++ b/pages/gather/writing/condition.tsx @@ -82,7 +82,7 @@ function WritingCondition() { const toggleSwitch = (e: ChangeEvent, type: GatherConditionType) => { const isChecked = e.target.checked; - console.log(type); + if (type === "location" && isChecked) { setLocation(session?.user.location); } diff --git a/pages/profile/[uid].tsx b/pages/profile/[uid].tsx index a5b30dba9..4a1f8a4f8 100644 --- a/pages/profile/[uid].tsx +++ b/pages/profile/[uid].tsx @@ -39,7 +39,7 @@ function ProfilePage() { enabled: !!uid, }); - console.log(uid, user); + useEffect(() => { if (user) setTransferUserName(user.name); diff --git a/pages/square/secret/[id].tsx b/pages/square/secret/[id].tsx index 8af366769..6293c806e 100644 --- a/pages/square/secret/[id].tsx +++ b/pages/square/secret/[id].tsx @@ -132,7 +132,7 @@ function SecretSquareDetailPage() { }, ); }; - console.log(squareDetail); + return ( <>
diff --git a/pages/vote.tsx b/pages/vote.tsx index bcc2d733b..5796f9ae4 100644 --- a/pages/vote.tsx +++ b/pages/vote.tsx @@ -43,7 +43,7 @@ export default function StudyVoteMap() { enabled: !!location && !!date, }); - console.log(2, studyVoteData); + //메인 스터디 장소가 선택되면 3km 거리 이하의 장소들이 2지망으로 자동 선택 useEffect(() => {