diff --git a/.eslintrc.json b/.eslintrc.json index 2180e0d1..b9c12cbf 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -46,6 +46,8 @@ "groups": ["builtin", "external", "internal", ["parent", "sibling"], "index"], //import 순서를 고정. builtin- 외부- 내부 "pathGroups": [ //react 컴포넌트가 builtin 뒤에 (external import 앞에 나오도록 설정) + { "pattern": "./**", "group": "internal" }, // './'로 시작하는 상대 경로 파일은 internal 그룹에 속하도록 설정 + { "pattern": "../**", "group": "parent", "position": "before" }, // '../'로 시작하는 상위 경로 파일은 parent 그룹에 속하도록 설정 { "pattern": "react", "group": "builtin", "position": "after" }, { "pattern": "react-dom", "group": "builtin", "position": "after" } ], diff --git a/.stylelintrc b/.stylelintrc index ffe3e9e1..3247107f 100644 --- a/.stylelintrc +++ b/.stylelintrc @@ -14,5 +14,6 @@ ], "rules": { "color-named": "never" - } + }, + "ignoreFiles": ["**/*.tsx"] } diff --git a/src/pages/ComponentTesting.tsx b/src/pages/ComponentTesting.tsx index 684139b5..666cb12a 100644 --- a/src/pages/ComponentTesting.tsx +++ b/src/pages/ComponentTesting.tsx @@ -1,24 +1,24 @@ import Button from 'components/atomComponents/Button'; import Text from 'components/atomComponents/Text'; import { - MainLogoIc, - HambergerIc, - ExitIc, - InputCancelIc, - RadioCheckIc, - RadioCheckedIc, BackIc, - PlusIc, - InputErrorIc, + ClockIc, DropDownIc, DropUpIc, - PasswordOpenEyeIc, - PasswordEyeIc, + ExitIc, + HambergerIc, + InputCancelIc, + InputErrorIc, LinkIc, - PlaceIc, - ClockIc, - OnlinePlaceIc, + MainLogoIc, OfflinePlaceIc, + OnlinePlaceIc, + PasswordEyeIc, + PasswordOpenEyeIc, + PlaceIc, + PlusIc, + RadioCheckIc, + RadioCheckedIc, TimeIc, } from 'components/Icon/icon'; import styled from 'styled-components/macro'; diff --git a/src/pages/bestMeetTime/hooks/getBestMeetimeList.ts b/src/pages/bestMeetTime/hooks/getBestMeetimeList.ts index 97b6c00d..1ab9c09b 100644 --- a/src/pages/bestMeetTime/hooks/getBestMeetimeList.ts +++ b/src/pages/bestMeetTime/hooks/getBestMeetimeList.ts @@ -4,78 +4,6 @@ import { authClient } from 'utils/apis/axios'; import { DateTimeData } from '../types/meetCardData'; -const initialData = { - status: 200, - message: '최적의 회의시간 조회 성공입니다.', - data: { - memberCount: 12, - bestDateTime: { - month: '7', - day: '30', - dayOfWeek: '월', - startTime: '06:00', - endTime: '12:00', - users: [ - { - id: 1, - name: '심은서', - }, - { - id: 2, - name: '이동헌', - }, - { - id: 3, - name: '정찬우', - }, - ], - }, - otherDateTimes: [ - { - month: '7', - day: '31', - dayOfWeek: '화', - startTime: '06:00', - endTime: '12:00', - users: [ - { - id: 1, - name: '심은서', - }, - { - id: 2, - name: '이동헌', - }, - { - id: 3, - name: '정찬우', - }, - ], - }, - { - month: '7', - day: '32', - dayOfWeek: '화', - startTime: '06:00', - endTime: '12:00', - users: [ - { - id: 1, - name: '심은서', - }, - { - id: 2, - name: '이동헌', - }, - { - id: 3, - name: '정찬우', - }, - ], - }, - ], - }, -}; const GetBestMeetimeListHooks = (meetingId: string) => { const [isError, setIsError] = useState(false); const [isloading, setIsloading] = useState(true); @@ -86,10 +14,9 @@ const GetBestMeetimeListHooks = (meetingId: string) => { setIsloading(true); const result = await authClient.get(`/meeting/${meetingId}/details`); setBestTimeData(result.data); - // setTimeout(() => setBestTimeData(initialData), 1000); } catch (error) { console.log(error); - setIsError(true) + setIsError(true); } setIsloading(false); }; @@ -100,7 +27,7 @@ const GetBestMeetimeListHooks = (meetingId: string) => { }, [meetingId], ); - return { isloading, bestTimeData ,isError }; + return { isloading, bestTimeData, isError }; }; export default GetBestMeetimeListHooks; diff --git a/src/pages/createMeeting/components/useFunnel/SetAdditionalInfo.tsx b/src/pages/createMeeting/components/useFunnel/SetAdditionalInfo.tsx index 79179077..b980cd42 100644 --- a/src/pages/createMeeting/components/useFunnel/SetAdditionalInfo.tsx +++ b/src/pages/createMeeting/components/useFunnel/SetAdditionalInfo.tsx @@ -1,15 +1,15 @@ -import { FunnelProps, MeetingInfo } from 'pages/createMeeting/types/useFunnelInterface'; +import React from 'react'; +import { isAxiosError } from 'axios'; import Button from 'components/atomComponents/Button'; -import React from 'react'; import Text from 'components/atomComponents/Text'; import TextAreaInput from 'components/atomComponents/TextAreaInput'; -import { createMeetingApi } from 'utils/apis/legacy/createMeetingApi'; -import { isAxiosError } from 'axios'; -import styled from 'styled-components/macro'; +import { FunnelProps, MeetingInfo } from 'pages/createMeeting/types/useFunnelInterface'; import { useNavigate } from 'react-router-dom'; +import styled from 'styled-components/macro'; +import { createMeetingApi } from 'utils/apis/legacy/createMeetingApi'; -function SetAdditionalInfo({ meetingInfo, setMeetingInfo, setStep }: FunnelProps) { +function SetAdditionalInfo({ meetingInfo, setMeetingInfo }: FunnelProps) { const navigate = useNavigate(); const textAreaOnChange = (e: React.ChangeEvent) => { if (e.target.value.length < 51) { diff --git a/src/pages/cueCard/hooks/getQCardData.ts b/src/pages/cueCard/hooks/getQCardData.ts index b781abd0..0fba927e 100644 --- a/src/pages/cueCard/hooks/getQCardData.ts +++ b/src/pages/cueCard/hooks/getQCardData.ts @@ -1,40 +1,9 @@ import { useEffect, useState } from 'react'; -import { authClient, client } from 'utils/apis/axios'; +import { authClient } from 'utils/apis/axios'; import { CueCardResponse } from '../types/cueCardType'; -const initCardData: CueCardResponse = { - status: 200, - message: '큐카드 조회 성공입니다.', - data: { - title: 'ASAP 간챙기자', - place: 'ONLINE', - placeDetail: '', - month: '7', - day: '30', - dayOfWeek: '월', - startTime: '06:00', - endTime: '12:00', - hostName: '서지원', - userNames: [ - '서지원', - '도소현', - '도소현', - '도소현', - '도소현', - '도소현', - '도소현', - '도소현', - '도소현', - '도소현', - '도소현', - '도소현', - '도소현', - ], - additionalInfo: '', - }, -}; const GetQcardDataHooks = (meetingId: string) => { const [isloading, setIsloading] = useState(true); const [isError, setIsError] = useState(false); @@ -45,7 +14,6 @@ const GetQcardDataHooks = (meetingId: string) => { setIsloading(true); const result = await authClient.get(`/meeting/${meetingId}/card`); setCueCardData(result.data); - // setTimeout(() => setCueCardData(initCardData), 1000); } catch (error) { console.log(error); setIsError(true); diff --git a/src/pages/legacy/overallSchedule/OverallSchedule.tsx b/src/pages/legacy/overallSchedule/OverallSchedule.tsx index e19b2805..b410cc5c 100644 --- a/src/pages/legacy/overallSchedule/OverallSchedule.tsx +++ b/src/pages/legacy/overallSchedule/OverallSchedule.tsx @@ -1,17 +1,19 @@ -import React, { useEffect, useState } from 'react'; -import { availableDatesAtom, preferTimesAtom, timeSlotUserNameAtom } from 'atoms/atom'; -import { useRecoilState, useRecoilValue } from 'recoil'; +import { availableDatesAtom, preferTimesAtom, timeSlotUserNameAtom } from 'atoms/atom'; +import Text from 'components/atomComponents/Text'; import LoadingPage from 'pages/errorLoading/LoadingPage'; +import { useEffect, useState } from 'react'; +import { useParams } from 'react-router-dom'; +import { useRecoilState, useRecoilValue } from 'recoil'; import { OverallScheduleData } from 'src/types/overallScheduleType'; -import Text from 'components/atomComponents/Text'; -import TimeTable from './components/TimeTable'; -import { availableScheduleOptionApi } from 'utils/apis/legacy/availbleScheduleOptionApi'; -import { getFormattedAvailableDateTimes } from './utils/getFormattedAvailableDateTimes'; -import { overallScheduleApi } from 'utils/apis/legacy/overallScheduleApi'; import { styled } from 'styled-components'; import { theme } from 'styles/theme'; -import { useParams } from 'react-router-dom'; +import { availableScheduleOptionApi } from 'utils/apis/legacy/availbleScheduleOptionApi'; +import { overallScheduleApi } from 'utils/apis/legacy/overallScheduleApi'; + +import TimeTable from './components/TimeTable'; +import { getFormattedAvailableDateTimes } from './utils/getFormattedAvailableDateTimes'; + const OverallSchedule = () => { const { meetingId } = useParams(); diff --git a/src/pages/legacy/selectSchedule/components/DateDropDown.tsx b/src/pages/legacy/selectSchedule/components/DateDropDown.tsx index db2943d8..6990fe09 100644 --- a/src/pages/legacy/selectSchedule/components/DateDropDown.tsx +++ b/src/pages/legacy/selectSchedule/components/DateDropDown.tsx @@ -1,7 +1,5 @@ -import React, { Dispatch, MouseEvent, SetStateAction } from 'react'; - import Text from 'components/atomComponents/Text'; -import { useRecoilState } from 'recoil'; +import React from 'react'; import styled from 'styled-components/macro'; import { theme } from 'styles/theme'; @@ -10,7 +8,6 @@ interface PropTypes { month: string; day: string; dayOfWeek: string; - // setScheduleList: Dispatch>; handleDate: (id: number, data: string) => void; } diff --git a/src/pages/legacy/selectSchedule/components/DateSelect.tsx b/src/pages/legacy/selectSchedule/components/DateSelect.tsx index cc9d7cce..20b8d107 100644 --- a/src/pages/legacy/selectSchedule/components/DateSelect.tsx +++ b/src/pages/legacy/selectSchedule/components/DateSelect.tsx @@ -1,11 +1,11 @@ -import React, { Dispatch, SetStateAction, useEffect, useRef, useState } from 'react'; - import Text from 'components/atomComponents/Text'; import { DropDownIc, DropUpIc } from 'components/Icon/icon'; +import { useEffect, useRef, useState } from 'react'; import styled from 'styled-components/macro'; import { theme } from 'styles/theme'; import DateDropDown from './DateDropDown'; + import { DateStates, ScheduleStates } from '../types/Schedule'; interface PropTypes { diff --git a/src/pages/loginEntrance/components/HostComponent.tsx b/src/pages/loginEntrance/components/HostComponent.tsx index 813e48c2..643a39ae 100644 --- a/src/pages/loginEntrance/components/HostComponent.tsx +++ b/src/pages/loginEntrance/components/HostComponent.tsx @@ -59,10 +59,7 @@ function HostComponent({ hostInfo, setHostInfo }: HostProps) { } } catch (err) { if (isAxiosError(err)) { - // // axios에서 발생한 error - // const err = e as AxiosError; if (err.response) { - //타입 가드 사용 if (err.response.status === 400) { setIsLoginModalOpen(true); } else if (err.response.status === 401) { diff --git a/src/pages/onBoarding/OnBoarding.tsx b/src/pages/onBoarding/OnBoarding.tsx index f908d8a3..c3da3016 100644 --- a/src/pages/onBoarding/OnBoarding.tsx +++ b/src/pages/onBoarding/OnBoarding.tsx @@ -44,7 +44,6 @@ const slides = [ ]; function OnBoarding() { - console.log('배포 자동화 테스트 성공??!!???'); return ( <> diff --git a/src/pages/overallSchedule/components/OverallScheduleTable.tsx b/src/pages/overallSchedule/components/OverallScheduleTable.tsx index 6d862223..716b1038 100644 --- a/src/pages/overallSchedule/components/OverallScheduleTable.tsx +++ b/src/pages/overallSchedule/components/OverallScheduleTable.tsx @@ -10,6 +10,7 @@ import { import OverallScheduleColumn from './OverallScheduleColumn'; import UserNames from './UserNames'; + import { ClickContext } from '../contexts/useClickContext'; interface OverallScheduleTableProps extends TimetableStructure { diff --git a/src/pages/selectSchedule/SelectSchedule.tsx b/src/pages/selectSchedule/SelectSchedule.tsx index 8d1d7864..0d84cf01 100644 --- a/src/pages/selectSchedule/SelectSchedule.tsx +++ b/src/pages/selectSchedule/SelectSchedule.tsx @@ -19,7 +19,6 @@ function SelectSchedule() { const { data, isLoading } = useGetTimetable(meetingId); // 시간대 선택 단계가 없어질 것을 고려하여 상수값을 설정해놓음 const PREFER_TIMES = { startTime: '06:00', endTime: '24:00' }; - return (