-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
여태까지 브랜치 분할되어 작업한것들 일단 모두 합치고 정리하냐고고 조금 지저분 했습니다!
- Loading branch information
Showing
6 changed files
with
83 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import { Box, Flex } from "@chakra-ui/react"; | ||
import { Dayjs } from "dayjs"; | ||
|
||
import { getTextSwitcherProps } from "../../pageTemplates/home/studyController/StudyController"; | ||
import { dayjsToStr, getCalendarDates } from "../../utils/dateTimeUtils"; | ||
import CalendarDayBox from "../atoms/CalendarDayBox"; | ||
|
||
interface CalendarProps { | ||
selectedDate: Dayjs; | ||
func: (date: number) => void; | ||
} | ||
|
||
const DAYS = ["일", "월", "화", "수", "목", "금", "토"]; | ||
|
||
function WeekSlideCalendar({ selectedDate, func }: CalendarProps) { | ||
const textSwitcherProps = getTextSwitcherProps(selectedDate, func); | ||
|
||
const calendarArr = getCalendarDates("week", selectedDate); | ||
|
||
return ( | ||
<> | ||
{/* <BetweenTextSwitcher left={textSwitcherProps.left} right={textSwitcherProps.right} /> */} | ||
|
||
<> | ||
<Flex overflow="auto" flex={1}> | ||
{calendarArr.map((date, idx) => ( | ||
<Box key={idx} mr="14px"> | ||
<CalendarDayBox date={date} selectedDate={dayjsToStr(selectedDate)} func={func} /> | ||
</Box> | ||
))} | ||
{/* <Flex h="42px" align="center" color="var(--gray-500)" fontWeight={500}> | ||
{DAYS.map((day, idx) => ( | ||
<Flex justify="center" align="center" flex={1} h="30px" key={idx}> | ||
{day} | ||
</Flex> | ||
))} | ||
</Flex> | ||
<Flex h="58px"> | ||
{calendarArr.map((dateStr, idx) => { | ||
const date = dayjs(dateStr).date(); | ||
return ( | ||
<Flex mr="14px" key={idx} justify="center" align="center"> | ||
<DatePointButton | ||
date={date} | ||
func={func} | ||
isSelected={date === selectedDate.date()} | ||
/> | ||
</Flex> | ||
); | ||
})} | ||
</Flex> */} | ||
</Flex> | ||
</> | ||
</> | ||
); | ||
} | ||
|
||
export default WeekSlideCalendar; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters