Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Chore] import order 수정 #889

Merged
merged 1 commit into from
Jun 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions components/Layout/CurrentMatch.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import Link from 'next/link';
import { useEffect, useState } from 'react';
import { useRecoilValue, useSetRecoilState } from 'recoil';
import { modalState } from 'utils/recoil/modal';
import { stringToHourMin } from 'utils/handleTime';
import useGetCurrentMatch from 'hooks/Layout/useGetCurrentMatch';
import { currentMatchState } from 'utils/recoil/match';
import { CurrentMatchList, CurrentMatchListElement } from 'types/matchTypes';
import { Modal } from 'types/modalTypes';
import styles from 'styles/Layout/CurrentMatchInfo.module.scss';
import { stringToHourMin } from 'utils/handleTime';
import { currentMatchState } from 'utils/recoil/match';
import { modalState } from 'utils/recoil/modal';
import useGetCurrentMatch from 'hooks/Layout/useGetCurrentMatch';
import { TbMenu } from 'react-icons/tb';
import styles from 'styles/Layout/CurrentMatchInfo.module.scss';
import LoudSpeaker from './LoudSpeaker';

export default function CurrentMatch() {
Expand Down
13 changes: 6 additions & 7 deletions components/Layout/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
import Link from 'next/link';
import { useEffect, useContext } from 'react';
import { useRecoilState, useSetRecoilState } from 'recoil';
import { Modal } from 'types/modalTypes';
import { liveState } from 'utils/recoil/layout';
import { useEffect } from 'react';
import { modalState } from 'utils/recoil/modal';
import MenuBar from './MenuBar/MenuBar';
import { FiMenu } from 'react-icons/fi';
import { BsMegaphone } from 'react-icons/bs';
import styles from 'styles/Layout/Header.module.scss';
import NotiBar from './NotiBar/NotiBar';
import { HeaderContextState, HeaderContext } from './HeaderContext';
import { useContext } from 'react';
import { Modal } from 'types/modalTypes';
import { modalState } from 'utils/recoil/modal';
import useAxiosGet from 'hooks/useAxiosGet';
import { FiMenu } from 'react-icons/fi';
import { BsMegaphone } from 'react-icons/bs';
import styles from 'styles/Layout/Header.module.scss';
import NotiBell from 'public/image/noti_bell.svg';

export default function Header() {
Expand Down
14 changes: 7 additions & 7 deletions components/Layout/Layout.tsx
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
import { useRouter } from 'next/router';
import { useEffect } from 'react';
import { useRecoilValue, useSetRecoilState } from 'recoil';
import { colorModeState } from 'utils/recoil/colorMode';
import { loginState } from 'utils/recoil/login';
import { userState } from 'utils/recoil/layout';
import { openCurrentMatchState } from 'utils/recoil/match';
import Statistics from 'pages/statistics';
import Header from './Header';
import Footer from './Footer';
import AdminLayout from '../admin/Layout';
import AdminReject from '../admin/AdminReject';
import styles from 'styles/Layout/Layout.module.scss';
import useAnnouncementCheck from 'hooks/Layout/useAnnouncementCheck';
import useSetAfterGameModal from 'hooks/Layout/useSetAfterGameModal';
import useGetUserSeason from 'hooks/Layout/useGetUserSeason';
import useLiveCheck from 'hooks/Layout/useLiveCheck';
import HeaderStateContext from './HeaderContext';
import StyledButton from 'components/StyledButton';
import MainPageProfile from './MainPageProfile';
import { openCurrentMatchState } from 'utils/recoil/match';
import CurrentMatch from './CurrentMatch';
import useAnnouncementCheck from 'hooks/Layout/useAnnouncementCheck';
import useSetAfterGameModal from 'hooks/Layout/useSetAfterGameModal';
import useGetUserSeason from 'hooks/Layout/useGetUserSeason';
import useLiveCheck from 'hooks/Layout/useLiveCheck';
import useAxiosResponse from 'hooks/useAxiosResponse';
import { useEffect } from 'react';
import styles from 'styles/Layout/Layout.module.scss';
import Cookies from 'js-cookie';

type AppLayoutProps = {
Expand Down
10 changes: 5 additions & 5 deletions components/Layout/MenuBar/MenuBar.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import Link from 'next/link';
import React, { useContext, useEffect, useState } from 'react';
import styles from 'styles/Layout/MenuBar.module.scss';
import { HeaderContextState, HeaderContext } from '../HeaderContext';
import { useRecoilValue } from 'recoil';
import { userState } from 'utils/recoil/layout';
import { User } from 'types/mainType';
import Link from 'next/link';
import PlayerImage from 'components/PlayerImage';
import { ProfileBasic } from 'types/userTypes';
import { userState } from 'utils/recoil/layout';
import PlayerImage from 'components/PlayerImage';
import { HeaderContextState, HeaderContext } from '../HeaderContext';
import { MainMenu, AdminMenu } from './MenuBarElement';
import useAxiosGet from 'hooks/useAxiosGet';
import styles from 'styles/Layout/MenuBar.module.scss';

const MenuTop = () => {
const HeaderState = useContext<HeaderContextState | null>(HeaderContext);
Expand Down
10 changes: 5 additions & 5 deletions components/Layout/MenuBar/MenuBarElement.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import React, { MouseEvent, useContext, MouseEventHandler } from 'react';
import Link from 'next/link';
import styles from 'styles/Layout/MenuBar.module.scss';
import { HeaderContextState, HeaderContext } from '../HeaderContext';
import useAxiosGet from 'hooks/useAxiosGet';
import React, { MouseEvent, useContext, MouseEventHandler } from 'react';
import { useRecoilValue, useSetRecoilState } from 'recoil';
import { User } from 'types/mainType';
import { Modal } from 'types/modalTypes';
import { modalState } from 'utils/recoil/modal';
import { userState } from 'utils/recoil/layout';
import { User } from 'types/mainType';
import { HeaderContextState, HeaderContext } from '../HeaderContext';
import useAxiosGet from 'hooks/useAxiosGet';
import styles from 'styles/Layout/MenuBar.module.scss';
import RankingEmoji from 'public/image/menu_ranking.svg';
import CurrentMatchEmoji from 'public/image/menu_currentMatch.svg';
import AnnouncementEmoji from 'public/image/menu_announcement.svg';
Expand Down
13 changes: 6 additions & 7 deletions components/Layout/NotiBar/NotiBar.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import { useContext } from 'react';
import styles from 'styles/Layout/NotiBar.module.scss';
import { HeaderContextState, HeaderContext } from '../HeaderContext';
import NotiStateContext from './NotiContext';
import { NotiContextState, NotiProvider } from './NotiContext';
import NotiItem from './NotiItem';
import { useSetRecoilState } from 'recoil';
import { errorState } from 'utils/recoil/error';
import { instance } from 'utils/axios';
import { Noti } from 'types/notiTypes';
import { instance } from 'utils/axios';
import { errorState } from 'utils/recoil/error';
import { HeaderContextState, HeaderContext } from '../HeaderContext';
import NotiStateContext, { NotiContextState, NotiProvider } from './NotiContext';
import NotiItem from './NotiItem';
import styles from 'styles/Layout/NotiBar.module.scss';
import NotiEmptyEmoji from 'public/image/noti_empty.svg';

export default function NotiBar() {
Expand Down
5 changes: 2 additions & 3 deletions components/Layout/NotiBar/NotiContext.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { Dispatch, SetStateAction, createContext } from 'react';
import { useState, useEffect } from 'react';
import { Dispatch, SetStateAction, createContext, useState, useEffect } from 'react';
import { Noti } from 'types/notiTypes';
import useReloadHandler from 'hooks/useReloadHandler';
import useAxiosGet from 'hooks/useAxiosGet';
import useReloadHandler from 'hooks/useReloadHandler';

export interface NotiContextState {
noti: Noti[];
Expand Down
4 changes: 2 additions & 2 deletions components/Layout/NotiBar/NotiItem.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import Link from 'next/link';
import { useContext } from 'react';
import { Noti } from 'types/notiTypes';
import styles from 'styles/Layout/NotiItem.module.scss';
import { HeaderContextState, HeaderContext } from '../HeaderContext';
import { useContext } from 'react';
import { BsCheckLg } from 'react-icons/bs';
import styles from 'styles/Layout/NotiItem.module.scss';

interface NotiItemProps {
data: Noti;
Expand Down
6 changes: 0 additions & 6 deletions components/LoginChecker.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
import { useRouter } from 'next/router';
import { useState, useEffect } from 'react';
import { useRecoilState } from 'recoil';
import { loginState } from 'utils/recoil/login';
import { firstVisitedState } from 'utils/recoil/modal';
// import Load from 'pages/load';
import Login from 'pages/login';
import WelcomeModal from './modal/event/WelcomeModal';
import styles from 'styles/Layout/Layout.module.scss';
Expand Down
2 changes: 1 addition & 1 deletion components/admin/Layout.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Link from 'next/link';
import SideNav from './SideNav';
import styles from 'styles/admin/Layout.module.scss';
import useAxiosWithToast from 'hooks/useAxiosWithToast';
import styles from 'styles/admin/Layout.module.scss';

type AdminLayoutProps = {
children: React.ReactNode;
Expand Down
10 changes: 5 additions & 5 deletions components/admin/announcement/AnnounceEdit.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { useEffect, useState } from 'react';
import dynamic from 'next/dynamic';
import { useEffect, useState } from 'react';
import { useRecoilValue, useSetRecoilState } from 'recoil';
import { userState } from 'utils/recoil/layout';
import { QUILL_EDIT_MODULES, QUILL_FORMATS } from 'types/quillTypes';
import { instanceInManage, instance } from 'utils/axios';
import { userState } from 'utils/recoil/layout';
import { toastState } from 'utils/recoil/toast';
import styles from 'styles/admin/announcement/AnnounceEdit.module.scss';
import 'react-quill/dist/quill.snow.css';
import 'react-quill/dist/quill.bubble.css';
import { QUILL_EDIT_MODULES, QUILL_FORMATS } from 'types/quillTypes';
import styles from 'styles/admin/announcement/AnnounceEdit.module.scss';
import { toastState } from 'utils/recoil/toast';

const Quill = dynamic(() => import('react-quill'), {
ssr: false,
Expand Down
10 changes: 5 additions & 5 deletions components/admin/announcement/AnnounceList.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
import { useCallback, useEffect, useState } from 'react';
import dynamic from 'next/dynamic';
import { useCallback, useEffect, useState } from 'react';
import { QUILL_FORMATS } from 'types/quillTypes';
import { instanceInManage } from 'utils/axios';
import PageNation from 'components/Pagination';
import { tableFormat } from 'constants/admin/table';
import { QUILL_FORMATS } from 'types/quillTypes';
import PageNation from 'components/Pagination';
import {
Paper,
Paper,
Table,
TableBody,
TableCell,
TableContainer,
TableHead,
TableRow,
} from '@mui/material';
import styles from 'styles/admin/announcement/AnnounceList.module.scss';
import 'react-quill/dist/quill.snow.css';
import 'react-quill/dist/quill.bubble.css';
import styles from 'styles/admin/announcement/AnnounceList.module.scss';

const Quill = dynamic(() => import('react-quill'), {
ssr: false,
Expand Down
2 changes: 1 addition & 1 deletion components/admin/common/AdminSearchBar.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import useSearchBar from 'hooks/useSearchBar';
import { GoSearch } from 'react-icons/go';
import { IoIosCloseCircle } from 'react-icons/io';
import styles from 'styles/admin/common/AdminSearchBar.module.scss';
import useSearchBar from 'hooks/useSearchBar';

const MAX_SEARCH_LENGTH = 15;

Expand Down
6 changes: 3 additions & 3 deletions components/admin/feedback/FeedbackTable.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { useCallback, useEffect, useState } from 'react';
import { useRecoilState } from 'recoil';
import { instanceInManage } from 'utils/axios';
import { getFormattedDateToString } from 'utils/handleTime';
import { modalState } from 'utils/recoil/modal';
import PageNation from 'components/Pagination';
import AdminSearchBar from 'components/admin/common/AdminSearchBar';
import { tableFormat } from 'constants/admin/table';
import AdminSearchBar from 'components/admin/common/AdminSearchBar';
import PageNation from 'components/Pagination';
import {
Paper,
Table,
Expand All @@ -15,7 +16,6 @@ import {
TableRow,
} from '@mui/material';
import styles from 'styles/admin/feedback/FeedbackTable.module.scss';
import { getFormattedDateToString } from 'utils/handleTime';

const tableTitle: { [key: string]: string } = {
id: 'ID',
Expand Down
4 changes: 2 additions & 2 deletions components/admin/games/GamesTable.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { useCallback, useEffect, useState } from 'react';
import PageNation from 'components/Pagination';
import { IGames, IGameLog } from 'types/admin/gameLogTypes';
import { instanceInManage } from 'utils/axios';
import { getFormattedDateToString, gameTimeToString } from 'utils/handleTime';
import AdminSearchBar from '../common/AdminSearchBar';
import styles from 'styles/admin/games/GamesTable.module.scss';
import PageNation from 'components/Pagination';
import ModifyScoreForm from './ModifyScoreForm';
import styles from 'styles/admin/games/GamesTable.module.scss';

export default function GamesTable() {
const [currentPage, setCurrentPage] = useState<number>(1);
Expand Down
2 changes: 1 addition & 1 deletion components/admin/games/ModifyScoreForm.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useSetRecoilState } from 'recoil';
import { modalState } from 'utils/recoil/modal';
import { ModifyScoreType } from 'types/admin/gameLogTypes';
import { modalState } from 'utils/recoil/modal';
import styles from 'styles/admin/games/GamesTable.module.scss';

export default function ModifyScoreForm({
Expand Down
14 changes: 7 additions & 7 deletions components/admin/notification/NotificationTable.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
import { useCallback, useEffect, useState } from 'react';
import { useRecoilState } from 'recoil';
import { instanceInManage } from 'utils/axios';
import { getFormattedDateToString } from 'utils/handleTime';
import { modalState } from 'utils/recoil/modal';
import { tableFormat } from 'constants/admin/table';
import AdminSearchBar from 'components/admin/common/AdminSearchBar';
import CreateNotiButton from 'components/admin/notification/CreateNotiButton';
import PageNation from 'components/Pagination';
import {
Paper,
Table,
Expand All @@ -9,14 +16,7 @@ import {
TableHead,
TableRow,
} from '@mui/material';
import PageNation from 'components/Pagination';
import AdminSearchBar from 'components/admin/common/AdminSearchBar';
import CreateNotiButton from 'components/admin/notification/CreateNotiButton';
import styles from 'styles/admin/notification/NotificationTable.module.scss';
import { instanceInManage } from 'utils/axios';
import { getFormattedDateToString } from 'utils/handleTime';
import { useRecoilState } from 'recoil';
import { modalState } from 'utils/recoil/modal';

const tableTitle: { [key: string]: string } = {
notiId: 'ID',
Expand Down
12 changes: 6 additions & 6 deletions components/admin/penalty/PenaltyTable.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import { useCallback, useEffect, useState } from 'react';
import { useRecoilState } from 'recoil';
import { instanceInManage } from 'utils/axios';
import { getFormattedDateToString } from 'utils/handleTime';
import { modalState } from 'utils/recoil/modal';
import { tableFormat } from 'constants/admin/table';
import AdminSearchBar from 'components/admin/common/AdminSearchBar';
import PageNation from 'components/Pagination';
import {
Table,
TableBody,
Expand All @@ -9,13 +15,7 @@ import {
TableCell,
Paper,
} from '@mui/material';
import PageNation from 'components/Pagination';
import AdminSearchBar from 'components/admin/common/AdminSearchBar';
import { instanceInManage } from 'utils/axios';
import { modalState } from 'utils/recoil/modal';
import { tableFormat } from 'constants/admin/table';
import styles from 'styles/admin/penalty/PenaltyTable.module.scss';
import { getFormattedDateToString } from 'utils/handleTime';

interface IPenalty {
penaltyId: number;
Expand Down
2 changes: 1 addition & 1 deletion components/admin/season/SeasonCreate.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React, { useState } from 'react';
import { useSetRecoilState } from 'recoil';
import { ISeasonEditInfo } from 'types/seasonTypes';
import { instanceInManage } from 'utils/axios';
import { toastState } from 'utils/recoil/toast';
import { ISeasonEditInfo } from 'types/seasonTypes';
import {
Paper,
Table,
Expand Down
4 changes: 2 additions & 2 deletions components/admin/season/SeasonList.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { useEffect, useState } from 'react';
import { useSetRecoilState } from 'recoil';
import { tableFormat } from 'constants/admin/table';
import { ISeason, ISeasonList } from 'types/seasonTypes';
import { instanceInManage } from 'utils/axios';
import { modalState } from 'utils/recoil/modal';
import { toastState } from 'utils/recoil/toast';
import { ISeason, ISeasonList } from 'types/seasonTypes';
import { tableFormat } from 'constants/admin/table';
import {
Paper,
Table,
Expand Down
2 changes: 1 addition & 1 deletion components/admin/slot/SlotCurrent.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { useEffect, useState } from 'react';
import styles from 'styles/admin/slot/SlotCurrent.module.scss';
import {
CurrentMatch,
SlotCurrentProps,
Slots,
} from 'types/admin/adminSlotTypes';
import styles from 'styles/admin/slot/SlotCurrent.module.scss';

export default function SlotCurrent(props: SlotCurrentProps) {
const [slotInfo, setSlotInfo] = useState<CurrentMatch>({
Expand Down
4 changes: 2 additions & 2 deletions components/admin/slot/SlotMain.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { useEffect, useState } from 'react';
import { useSetRecoilState } from 'recoil';
import { CurrentMatch, EditedSchedule } from 'types/admin/adminSlotTypes';
import { instance, instanceInManage } from 'utils/axios';
import { toastState } from 'utils/recoil/toast';
import SlotCurrent from './SlotCurrent';
import SlotPreview from './SlotPreview';
import { toastState } from 'utils/recoil/toast';
import { GrLocationPin } from 'react-icons/gr';
import { CurrentMatch, EditedSchedule } from 'types/admin/adminSlotTypes';
import styles from 'styles/admin/slot/SlotMain.module.scss';

export default function SlotMain() {
Expand Down
2 changes: 1 addition & 1 deletion components/admin/slot/SlotPreview.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { useEffect, useState } from 'react';
import styles from 'styles/admin/slot/SlotCurrent.module.scss';
import {
PreviewMatch,
SlotPreviewProps,
Slot,
} from 'types/admin/adminSlotTypes';
import styles from 'styles/admin/slot/SlotCurrent.module.scss';

export default function SlotPreview(props: SlotPreviewProps) {
const { lastHour, scheduleInfo, currentHour, futurePreview } = props;
Expand Down
Loading