Skip to content

Commit

Permalink
Fix: 사용하지 않은 변수 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
hyunn522 committed Feb 18, 2024
1 parent c3496fe commit c14a3d4
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 19 deletions.
37 changes: 19 additions & 18 deletions src/components/common/BottomSheets/DateSelect/DateSelector.tsx
Original file line number Diff line number Diff line change
@@ -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<React.SetStateAction<boolean>>;
isFullDate: boolean;
isOpen: boolean;
onSelectDate: (
year: number,
month: number,
day: number,
) => void;
onSelectDate: (year: number, month: number, day: number) => void;
}

const DateSelector = ({
Expand All @@ -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월',
Expand Down Expand Up @@ -109,10 +98,22 @@ const DateSelector = ({
<div className={styles.SelectDate}>년/월 선택</div>
)}
<div className={styles.DatePicker}>
<DatePicker list={yearList} prevSelected={year-2019} onSelectedChange={handleChangeYear} />
<DatePicker list={monthList} prevSelected={month} onSelectedChange={handleChangeMonth} />
<DatePicker
list={yearList}
prevSelected={year - 2019}
onSelectedChange={handleChangeYear}
/>
<DatePicker
list={monthList}
prevSelected={month}
onSelectedChange={handleChangeMonth}
/>
{isFullDate ? (
<DatePicker list={dayList} prevSelected={day} onSelectedChange={handleChangeDay} />
<DatePicker
list={dayList}
prevSelected={day}
onSelectedChange={handleChangeDay}
/>
) : (
<></>
)}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Login/Kakao/KakaoLogin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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),
});
Expand Down

0 comments on commit c14a3d4

Please sign in to comment.