diff --git a/src/pages/home/Home.tsx b/src/pages/home/Home.tsx index 6943f04..bc84d9e 100644 --- a/src/pages/home/Home.tsx +++ b/src/pages/home/Home.tsx @@ -7,12 +7,12 @@ import { Body, HomeAside } from '@/shared'; import { Nav } from '@/shared/components/Nav'; import { NoteList } from '@/shared/components/NoteList'; -export const Home = () => { - const [date, setDate] = useState(new Date()); +type OptionalDate = Date | null; + +type DateSelection = OptionalDate | [OptionalDate, OptionalDate]; - const onChangeDate = (newDate: Date) => { - setDate(newDate); - }; +export const Home = () => { + const [date, setDate] = useState(new Date()); return ( <> @@ -29,7 +29,7 @@ export const Home = () => { formatDay={(_, date) => date.getDate().toString()} calendarType="gregory" value={date} - onChange={onChangeDate} + onChange={setDate} /> diff --git a/src/pages/setting/Setting.tsx b/src/pages/setting/Setting.tsx index 3e19d86..fa34a6b 100644 --- a/src/pages/setting/Setting.tsx +++ b/src/pages/setting/Setting.tsx @@ -2,7 +2,7 @@ import { useState } from 'react'; import { Box, Flex } from '@chakra-ui/react'; import styled from '@emotion/styled'; import { useNavigate } from 'react-router-dom'; -import { BaseButton, Body, handleAxiosError, http, PATH, styleToken, Typography } from '@/shared'; +import { BaseButton, Body, PATH, styleToken, Typography } from '@/shared'; import { Nav } from '@/shared/components/Nav'; type User = { @@ -30,17 +30,19 @@ export const Setting = () => { navigate(PATH.MAIN); }; - const getUserInfo = async () => { - try { - const responseInfo = await http.get('/api/v1/user/me'); - console.log(responseInfo); - setUser(responseInfo.data); - } catch (e) { - handleAxiosError(e); - // alert('로그인이 필요한 서비스입니다.'); - // navigate(PATH.MAIN); - } - }; + console.log(setUser); + + // const getUserInfo = async () => { + // try { + // const responseInfo = await http.get('/api/v1/user/me'); + // console.log(responseInfo); + // setUser(responseInfo.data); + // } catch (e) { + // handleAxiosError(e); + // alert('로그인이 필요한 서비스입니다.'); + // navigate(PATH.MAIN); + // } + // }; // useEffect(() => { // getUserInfo(); diff --git a/src/shared/components/Button/BaseButton.tsx b/src/shared/components/Button/BaseButton.tsx index ad23d75..aae618a 100644 --- a/src/shared/components/Button/BaseButton.tsx +++ b/src/shared/components/Button/BaseButton.tsx @@ -1,4 +1,4 @@ -import { HTMLAttributes, PropsWithChildren } from 'react'; +import React, { HTMLAttributes, PropsWithChildren } from 'react'; import { Button, ButtonProps } from '@chakra-ui/react'; import { customTheme, Typography, TypographyVariant } from '@/shared'; @@ -8,7 +8,7 @@ type BaseButtonProps = { font?: TypographyVariant; fontColor?: string; img?: React.ReactNode; - children?: string; + children?: React.ReactNode; isDisabled?: boolean; onClick?: () => void; } & HTMLAttributes; diff --git a/src/shared/components/Calendar/CustomCalendar.css b/src/shared/components/Calendar/CustomCalendar.css index 997be88..e3f651f 100644 --- a/src/shared/components/Calendar/CustomCalendar.css +++ b/src/shared/components/Calendar/CustomCalendar.css @@ -46,6 +46,13 @@ padding: 0.5em; } +.react-calendar__month-view__weekdays__weekday abbr, +.react-calendar__month-view__weekdays__weekday--weekend abbr, +.react-calendar__month-view__weekdays__weekday abbr[title], +.react-calendar__tile abbr { + text-decoration: none; +} + .react-calendar__month-view__weekNumbers .react-calendar__tile { display: flex; align-items: center; @@ -138,6 +145,3 @@ background-color: #e6e6e6; border-radius: 0; } - -.react-calendar__tile abbr { -}