From c14a3d4dfd8c79ff8fc647411c6d1bdf85ab73ea Mon Sep 17 00:00:00 2001 From: hyunn522 Date: Sun, 18 Feb 2024 19:05:23 +0900 Subject: [PATCH] =?UTF-8?q?Fix:=20=EC=82=AC=EC=9A=A9=ED=95=98=EC=A7=80=20?= =?UTF-8?q?=EC=95=8A=EC=9D=80=20=EB=B3=80=EC=88=98=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BottomSheets/DateSelect/DateSelector.tsx | 37 ++++++++++--------- src/pages/Login/Kakao/KakaoLogin.tsx | 2 +- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/src/components/common/BottomSheets/DateSelect/DateSelector.tsx b/src/components/common/BottomSheets/DateSelect/DateSelector.tsx index 9003af3..c5c4123 100644 --- a/src/components/common/BottomSheets/DateSelect/DateSelector.tsx +++ b/src/components/common/BottomSheets/DateSelect/DateSelector.tsx @@ -1,20 +1,15 @@ -import React, { useState } from 'react'; +import React from 'react'; import styles from './DateSelector.module.scss'; import BottomModal from '../BottomModal'; import DatePicker from './DatePicker'; import ConfirmButton from '../../Buttons/ConfirmBtn/ConfirmButton'; import useDateStore from '../../../../stores/dateStore'; -import { da } from 'date-fns/locale'; interface DateSelectorProps { clickOuter: React.Dispatch>; isFullDate: boolean; isOpen: boolean; - onSelectDate: ( - year: number, - month: number, - day: number, - ) => void; + onSelectDate: (year: number, month: number, day: number) => void; } const DateSelector = ({ @@ -23,15 +18,9 @@ const DateSelector = ({ isOpen, onSelectDate, }: DateSelectorProps) => { - const { year, month, day, setYear, setMonth, setDay } = useDateStore(); + const { year, month, day, setYear, setMonth } = useDateStore(); - const yearList = [ - '2020년', - '2021년', - '2022년', - '2023년', - '2024년', - ]; + const yearList = ['2020년', '2021년', '2022년', '2023년', '2024년']; const monthList = [ '01월', '02월', @@ -109,10 +98,22 @@ const DateSelector = ({
년/월 선택
)}
- - + + {isFullDate ? ( - + ) : ( <> )} diff --git a/src/pages/Login/Kakao/KakaoLogin.tsx b/src/pages/Login/Kakao/KakaoLogin.tsx index d1fa04a..13efecd 100644 --- a/src/pages/Login/Kakao/KakaoLogin.tsx +++ b/src/pages/Login/Kakao/KakaoLogin.tsx @@ -11,7 +11,7 @@ const KakaoLogin = () => { const kakaoCode = new URL(window.location.href).searchParams.get('code'); if (kakaoCode) { - const { isLoading, error, data } = useQuery({ + const { data } = useQuery({ queryKey: ['code', kakaoCode], queryFn: () => login(kakaoCode), });