From 17750b4873d42f07208620b2a236cf5741d5c0be Mon Sep 17 00:00:00 2001 From: lisaliuu <82255401+lisaliuu@users.noreply.github.com> Date: Mon, 18 Sep 2023 15:33:47 -0500 Subject: [PATCH] Moved dashboards pages -> components --- {pages => components/Organizer}/OrganizerDash.tsx | 12 ++++++------ {pages => components/hacker}/HackerDash.tsx | 10 +++++----- {pages => components/judges}/JudgeDash.tsx | 10 +++++----- pages/index.tsx | 6 +++--- 4 files changed, 19 insertions(+), 19 deletions(-) rename {pages => components/Organizer}/OrganizerDash.tsx (71%) rename {pages => components/hacker}/HackerDash.tsx (99%) rename {pages => components/judges}/JudgeDash.tsx (96%) diff --git a/pages/OrganizerDash.tsx b/components/Organizer/OrganizerDash.tsx similarity index 71% rename from pages/OrganizerDash.tsx rename to components/Organizer/OrganizerDash.tsx index 200e004a..34ae3d12 100644 --- a/pages/OrganizerDash.tsx +++ b/components/Organizer/OrganizerDash.tsx @@ -1,11 +1,11 @@ import { Button, Space, Tabs } from 'antd'; import { signOut, useSession } from 'next-auth/react'; -import ScheduleTab from '../components/Organizer/ScheduleTab/ScheduleTab'; -import JudgingTab from '../components/Organizer/JudgingTab/JudgingTab'; -import ManageUsersTab from '../components/Organizer/ManageUsersTab/ManageUsersTab'; -import PreAddUsersTab from '../components/Organizer/PreAddUsersTab/PreAddUsersTab'; -import ApplicantsTab from '../components/Organizer/ApplicantsTab/ApplicantsTab'; -import EventsTab from '../components/Organizer/EventsTab/EventsTab'; +import ScheduleTab from './ScheduleTab/ScheduleTab'; +import JudgingTab from './JudgingTab/JudgingTab'; +import ManageUsersTab from './ManageUsersTab/ManageUsersTab'; +import PreAddUsersTab from './PreAddUsersTab/PreAddUsersTab'; +import ApplicantsTab from './ApplicantsTab/ApplicantsTab'; +import EventsTab from './EventsTab/EventsTab'; export default function OrganizerDash() { // Get session data diff --git a/pages/HackerDash.tsx b/components/hacker/HackerDash.tsx similarity index 99% rename from pages/HackerDash.tsx rename to components/hacker/HackerDash.tsx index d24f9781..88c3f5f8 100644 --- a/pages/HackerDash.tsx +++ b/components/hacker/HackerDash.tsx @@ -16,11 +16,11 @@ import { UploadFile, } from 'antd'; import useSWR from 'swr'; -import TeamManager from '../components/hacker/TeamManager'; -import TeamSetup from '../components/hacker/TeamSetup'; -import { TeamProfile } from '../types/client'; -import { ApplicationStatus, UserData, JudgingSessionData } from '../types/database'; -import styles from '../styles/Form.module.css'; +import TeamManager from './TeamManager'; +import TeamSetup from './TeamSetup'; +import { TeamProfile } from '../../types/client'; +import { ApplicationStatus, UserData, JudgingSessionData } from '../../types/database'; +import styles from '../../styles/Form.module.css'; import { signOut, useSession } from 'next-auth/react'; import moment from 'moment'; import TextArea from 'antd/lib/input/TextArea'; diff --git a/pages/JudgeDash.tsx b/components/judges/JudgeDash.tsx similarity index 96% rename from pages/JudgeDash.tsx rename to components/judges/JudgeDash.tsx index 5ef4605d..e56fe36a 100644 --- a/pages/JudgeDash.tsx +++ b/components/judges/JudgeDash.tsx @@ -1,11 +1,11 @@ import { Button, Divider, notification, Skeleton } from 'antd'; import { Dispatch, SetStateAction, useEffect, useState } from 'react'; import useSWR, { useSWRConfig } from 'swr'; -import JudgingForm from '../components/judges/JudgingForm'; -import { JudgeSchedule } from '../components/judges/schedule'; -import TeamSelect from '../components/judges/TeamSelect'; -import { JudgingFormFields, ScheduleDisplay, TeamSelectData } from '../types/client'; -import { JudgingSessionData, ResponseError, TeamData } from '../types/database'; +import JudgingForm from './JudgingForm'; +import { JudgeSchedule } from './schedule'; +import TeamSelect from './TeamSelect'; +import { JudgingFormFields, ScheduleDisplay, TeamSelectData } from '../../types/client'; +import { JudgingSessionData, ResponseError, TeamData } from '../../types/database'; import { signOut, useSession } from 'next-auth/react'; import { ScopedMutator } from 'swr/dist/types'; diff --git a/pages/index.tsx b/pages/index.tsx index 9d955c21..d8a30360 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -3,9 +3,9 @@ import { signIn, useSession } from 'next-auth/react'; import { useState } from 'react'; import SignIn from '../components/signIn'; import { ApplicationStatus } from '../types/database'; -import HackerDash from './HackerDash'; -import JudgeDash from './JudgeDash'; -import OrganizerDash from './OrganizerDash'; +import HackerDash from '../components/hacker/HackerDash'; +import JudgeDash from '../components/judges/JudgeDash'; +import OrganizerDash from '../components/Organizer/OrganizerDash'; import Head from 'next/head'; export default function Page() {