From c676be4765a49d2c382ac88dddf3933747c5dbcb Mon Sep 17 00:00:00 2001 From: knownotunknown <78577376+knownotunknown@users.noreply.github.com> Date: Mon, 19 Feb 2024 18:26:09 -0600 Subject: [PATCH] Fixed build errors and restructured Calendar page --- ....timestamp-1708365827408-19c5144af9dbf.mjs | 30 +++++++++++++++++++ .../components/CalendarBottomBar.stories.tsx | 2 +- .../components/CalendarCourse.stories.tsx | 2 +- .../components/CalendarCourseCell.stories.tsx | 4 +-- .../components/CalendarGrid.stories.tsx | 2 +- .../components/CalendarGridCell.stories.tsx | 18 +++++------ .../components/CalendarHeader.stories.tsx | 2 +- .../components/CalendarSchedules.stories.tsx | 4 +-- .../components/ImportantLinks.stories.tsx | 2 +- src/views/components/PopupMain.tsx | 15 +++++----- .../CalendarBottomBar/CalendarBottomBar.tsx | 4 +-- .../CalendarCourseMeeting.module.scss | 0 .../CalendarCourseMeeting.tsx | 0 .../CalendarCourseCell/CalendarCourseCell.tsx | 2 +- .../CalendarGrid/CalendarGrid.module.scss | 0 .../CalendarGrid/CalendarGrid.tsx | 0 .../CalendarGridCell.module.scss | 0 .../CalendarGridCell/CalendarGridCell.tsx | 0 .../CalendarHeader/CalenderHeader.tsx | 10 +++---- .../CalendarSchedules/CalendarSchedules.tsx | 8 ++--- .../{ => calendar}/ImportantLinks.tsx | 2 +- src/views/hooks/useFlattenedCourseSchedule.ts | 2 +- 22 files changed, 69 insertions(+), 40 deletions(-) create mode 100644 .storybook/vite-storybook.config.ts.timestamp-1708365827408-19c5144af9dbf.mjs rename src/views/components/{common => calendar}/CalendarBottomBar/CalendarBottomBar.tsx (94%) rename src/views/components/{common => calendar}/CalendarCourseBlock/CalendarCourseMeeting.module.scss (100%) rename src/views/components/{common => calendar}/CalendarCourseBlock/CalendarCourseMeeting.tsx (100%) rename src/views/components/{common => calendar}/CalendarCourseCell/CalendarCourseCell.tsx (98%) rename src/views/components/{common => calendar}/CalendarGrid/CalendarGrid.module.scss (100%) rename src/views/components/{common => calendar}/CalendarGrid/CalendarGrid.tsx (100%) rename src/views/components/{common => calendar}/CalendarGridCell/CalendarGridCell.module.scss (100%) rename src/views/components/{common => calendar}/CalendarGridCell/CalendarGridCell.tsx (100%) rename src/views/components/{common => calendar}/CalendarHeader/CalenderHeader.tsx (87%) rename src/views/components/{common => calendar}/CalendarSchedules/CalendarSchedules.tsx (82%) rename src/views/components/{ => calendar}/ImportantLinks.tsx (98%) diff --git a/.storybook/vite-storybook.config.ts.timestamp-1708365827408-19c5144af9dbf.mjs b/.storybook/vite-storybook.config.ts.timestamp-1708365827408-19c5144af9dbf.mjs new file mode 100644 index 00000000..fa5cdaf3 --- /dev/null +++ b/.storybook/vite-storybook.config.ts.timestamp-1708365827408-19c5144af9dbf.mjs @@ -0,0 +1,30 @@ +// .storybook/vite-storybook.config.ts +import react from "file:///C:/Users/somgu/OneDrive/Desktop/UT-Registration-Plus/node_modules/.pnpm/@vitejs+plugin-react-swc@3.6.0_vite@5.1.2/node_modules/@vitejs/plugin-react-swc/index.mjs"; +import { resolve } from "path"; +import UnoCSS from "file:///C:/Users/somgu/OneDrive/Desktop/UT-Registration-Plus/node_modules/.pnpm/unocss@0.58.5_postcss@8.4.35_vite@5.1.2/node_modules/unocss/dist/vite.mjs"; +import Icons from "file:///C:/Users/somgu/OneDrive/Desktop/UT-Registration-Plus/node_modules/.pnpm/unplugin-icons@0.18.5_@svgr+core@8.1.0/node_modules/unplugin-icons/dist/vite.js"; +import { defineConfig } from "file:///C:/Users/somgu/OneDrive/Desktop/UT-Registration-Plus/node_modules/.pnpm/vite@5.1.2_@types+node@20.11.17_sass@1.70.0/node_modules/vite/dist/node/index.js"; +var __vite_injected_original_dirname = "C:\\Users\\somgu\\OneDrive\\Desktop\\UT-Registration-Plus\\.storybook"; +var root = resolve(__vite_injected_original_dirname, "../src"); +var pagesDir = resolve(root, "pages"); +var assetsDir = resolve(root, "assets"); +var publicDir = resolve(__vite_injected_original_dirname, "../public"); +console.log(root); +var vite_storybook_config_default = defineConfig({ + plugins: [react(), UnoCSS(), Icons({ compiler: "jsx", jsx: "react" })], + resolve: { + alias: { + src: root, + "@assets": assetsDir, + "@pages": pagesDir, + "@public": publicDir, + "@shared": resolve(root, "shared"), + "@background": resolve(pagesDir, "background"), + "@views": resolve(root, "views") + } + } +}); +export { + vite_storybook_config_default as default +}; +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLnN0b3J5Ym9vay92aXRlLXN0b3J5Ym9vay5jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCJDOlxcXFxVc2Vyc1xcXFxzb21ndVxcXFxPbmVEcml2ZVxcXFxEZXNrdG9wXFxcXFVULVJlZ2lzdHJhdGlvbi1QbHVzXFxcXC5zdG9yeWJvb2tcIjtjb25zdCBfX3ZpdGVfaW5qZWN0ZWRfb3JpZ2luYWxfZmlsZW5hbWUgPSBcIkM6XFxcXFVzZXJzXFxcXHNvbWd1XFxcXE9uZURyaXZlXFxcXERlc2t0b3BcXFxcVVQtUmVnaXN0cmF0aW9uLVBsdXNcXFxcLnN0b3J5Ym9va1xcXFx2aXRlLXN0b3J5Ym9vay5jb25maWcudHNcIjtjb25zdCBfX3ZpdGVfaW5qZWN0ZWRfb3JpZ2luYWxfaW1wb3J0X21ldGFfdXJsID0gXCJmaWxlOi8vL0M6L1VzZXJzL3NvbWd1L09uZURyaXZlL0Rlc2t0b3AvVVQtUmVnaXN0cmF0aW9uLVBsdXMvLnN0b3J5Ym9vay92aXRlLXN0b3J5Ym9vay5jb25maWcudHNcIjtpbXBvcnQgcmVhY3QgZnJvbSAnQHZpdGVqcy9wbHVnaW4tcmVhY3Qtc3djJztcbmltcG9ydCB7IHJlc29sdmUgfSBmcm9tICdwYXRoJztcbmltcG9ydCBVbm9DU1MgZnJvbSAndW5vY3NzL3ZpdGUnO1xuaW1wb3J0IEljb25zIGZyb20gJ3VucGx1Z2luLWljb25zL3ZpdGUnO1xuaW1wb3J0IHsgZGVmaW5lQ29uZmlnIH0gZnJvbSAndml0ZSc7XG5cbmNvbnN0IHJvb3QgPSByZXNvbHZlKF9fZGlybmFtZSwgJy4uL3NyYycpO1xuY29uc3QgcGFnZXNEaXIgPSByZXNvbHZlKHJvb3QsICdwYWdlcycpO1xuY29uc3QgYXNzZXRzRGlyID0gcmVzb2x2ZShyb290LCAnYXNzZXRzJyk7XG5jb25zdCBwdWJsaWNEaXIgPSByZXNvbHZlKF9fZGlybmFtZSwgJy4uL3B1YmxpYycpO1xuXG5jb25zb2xlLmxvZyhyb290KTtcblxuLy8gaHR0cHM6Ly92aXRlanMuZGV2L2NvbmZpZy9cbmV4cG9ydCBkZWZhdWx0IGRlZmluZUNvbmZpZyh7XG4gICAgcGx1Z2luczogW3JlYWN0KCksIFVub0NTUygpLCBJY29ucyh7IGNvbXBpbGVyOiAnanN4JywganN4OiAncmVhY3QnIH0pXSxcbiAgICByZXNvbHZlOiB7XG4gICAgICAgIGFsaWFzOiB7XG4gICAgICAgICAgICBzcmM6IHJvb3QsXG4gICAgICAgICAgICAnQGFzc2V0cyc6IGFzc2V0c0RpcixcbiAgICAgICAgICAgICdAcGFnZXMnOiBwYWdlc0RpcixcbiAgICAgICAgICAgICdAcHVibGljJzogcHVibGljRGlyLFxuICAgICAgICAgICAgJ0BzaGFyZWQnOiByZXNvbHZlKHJvb3QsICdzaGFyZWQnKSxcbiAgICAgICAgICAgICdAYmFja2dyb3VuZCc6IHJlc29sdmUocGFnZXNEaXIsICdiYWNrZ3JvdW5kJyksXG4gICAgICAgICAgICAnQHZpZXdzJzogcmVzb2x2ZShyb290LCAndmlld3MnKSxcbiAgICAgICAgfSxcbiAgICB9LFxufSk7XG4iXSwKICAibWFwcGluZ3MiOiAiO0FBQWlaLE9BQU8sV0FBVztBQUNuYSxTQUFTLGVBQWU7QUFDeEIsT0FBTyxZQUFZO0FBQ25CLE9BQU8sV0FBVztBQUNsQixTQUFTLG9CQUFvQjtBQUo3QixJQUFNLG1DQUFtQztBQU16QyxJQUFNLE9BQU8sUUFBUSxrQ0FBVyxRQUFRO0FBQ3hDLElBQU0sV0FBVyxRQUFRLE1BQU0sT0FBTztBQUN0QyxJQUFNLFlBQVksUUFBUSxNQUFNLFFBQVE7QUFDeEMsSUFBTSxZQUFZLFFBQVEsa0NBQVcsV0FBVztBQUVoRCxRQUFRLElBQUksSUFBSTtBQUdoQixJQUFPLGdDQUFRLGFBQWE7QUFBQSxFQUN4QixTQUFTLENBQUMsTUFBTSxHQUFHLE9BQU8sR0FBRyxNQUFNLEVBQUUsVUFBVSxPQUFPLEtBQUssUUFBUSxDQUFDLENBQUM7QUFBQSxFQUNyRSxTQUFTO0FBQUEsSUFDTCxPQUFPO0FBQUEsTUFDSCxLQUFLO0FBQUEsTUFDTCxXQUFXO0FBQUEsTUFDWCxVQUFVO0FBQUEsTUFDVixXQUFXO0FBQUEsTUFDWCxXQUFXLFFBQVEsTUFBTSxRQUFRO0FBQUEsTUFDakMsZUFBZSxRQUFRLFVBQVUsWUFBWTtBQUFBLE1BQzdDLFVBQVUsUUFBUSxNQUFNLE9BQU87QUFBQSxJQUNuQztBQUFBLEVBQ0o7QUFDSixDQUFDOyIsCiAgIm5hbWVzIjogW10KfQo= diff --git a/src/stories/components/CalendarBottomBar.stories.tsx b/src/stories/components/CalendarBottomBar.stories.tsx index a1f1c5c7..1ee78750 100644 --- a/src/stories/components/CalendarBottomBar.stories.tsx +++ b/src/stories/components/CalendarBottomBar.stories.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { Meta, StoryObj } from '@storybook/react'; import { Course, Status } from '@shared/types/Course'; import Instructor from '@shared/types/Instructor'; -import { CalendarBottomBar } from '@views/components/common/CalendarBottomBar/CalendarBottomBar'; +import { CalendarBottomBar } from 'src/views/components/calendar/CalendarBottomBar/CalendarBottomBar'; import { getCourseColors } from '../../shared/util/colors'; const exampleGovCourse: Course = new Course({ diff --git a/src/stories/components/CalendarCourse.stories.tsx b/src/stories/components/CalendarCourse.stories.tsx index 77ed8a2e..43cd032e 100644 --- a/src/stories/components/CalendarCourse.stories.tsx +++ b/src/stories/components/CalendarCourse.stories.tsx @@ -3,7 +3,7 @@ import { Course, Status } from '@shared/types/Course'; import { CourseMeeting, DAY_MAP } from '@shared/types/CourseMeeting'; import { CourseSchedule } from '@shared/types/CourseSchedule'; import Instructor from '@shared/types/Instructor'; -import CalendarCourse from '@views/components/common/CalendarCourseBlock/CalendarCourseMeeting'; +import CalendarCourse from 'src/views/components/calendar/CalendarCourseBlock/CalendarCourseMeeting'; const meta = { title: 'Components/Common/CalendarCourseMeeting', diff --git a/src/stories/components/CalendarCourseCell.stories.tsx b/src/stories/components/CalendarCourseCell.stories.tsx index 61cbdd33..cc3ae3aa 100644 --- a/src/stories/components/CalendarCourseCell.stories.tsx +++ b/src/stories/components/CalendarCourseCell.stories.tsx @@ -1,7 +1,7 @@ import { Course, Status } from '@shared/types/Course'; import { getCourseColors } from '@shared/util/colors'; import { Meta, StoryObj } from '@storybook/react'; -import CalendarCourseCell from '@views/components/common/CalendarCourseCell/CalendarCourseCell'; +import CalendarCourseCell from 'src/views/components/calendar/CalendarCourseCell/CalendarCourseCell'; import React from 'react'; import { exampleCourse } from './PopupCourseBlock.stories'; @@ -91,7 +91,7 @@ export const Variants: Story = { // uniqueId: 67890, // url: 'https://utdirect.utexas.edu/apps/registrar/course_schedule/20242/12345/', // }); - + colors={getCourseColors('green', 500)} /> ; export default meta; type Story = StoryObj; -export const Default: Story = {}; \ No newline at end of file +export const Default: Story = {}; diff --git a/src/stories/components/CalendarHeader.stories.tsx b/src/stories/components/CalendarHeader.stories.tsx index 047d8694..cd715035 100644 --- a/src/stories/components/CalendarHeader.stories.tsx +++ b/src/stories/components/CalendarHeader.stories.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { Meta, StoryObj } from '@storybook/react'; -import CalendarHeader from '@views/components/common/CalendarHeader/CalenderHeader'; +import CalendarHeader from 'src/views/components/calendar/CalendarHeader/CalenderHeader'; const meta = { title: 'Components/Common/CalendarHeader', diff --git a/src/stories/components/CalendarSchedules.stories.tsx b/src/stories/components/CalendarSchedules.stories.tsx index 0dd60e2f..ccd13b4c 100644 --- a/src/stories/components/CalendarSchedules.stories.tsx +++ b/src/stories/components/CalendarSchedules.stories.tsx @@ -5,7 +5,7 @@ import React from 'react'; import { CourseMeeting, DAY_MAP } from 'src/shared/types/CourseMeeting'; import { CourseSchedule } from 'src/shared/types/CourseSchedule'; import Instructor from 'src/shared/types/Instructor'; -import { CalendarSchedules } from 'src/views/components/common/CalendarSchedules/CalendarSchedules'; +import { CalendarSchedules } from 'src/views/components/calendar/CalendarSchedules/CalendarSchedules'; const meta = { title: 'Components/Common/CalendarSchedules', @@ -17,7 +17,6 @@ const meta = { argTypes: { dummySchedules: { control: 'object' }, dummyActiveIndex: { control: 'number' }, - }, render: (args: any) => (
@@ -141,6 +140,5 @@ export const Default: Story = { args: { dummySchedules: schedules, dummyActiveIndex: 0, - }, }; diff --git a/src/stories/components/ImportantLinks.stories.tsx b/src/stories/components/ImportantLinks.stories.tsx index 9f8a606d..95619fa9 100644 --- a/src/stories/components/ImportantLinks.stories.tsx +++ b/src/stories/components/ImportantLinks.stories.tsx @@ -1,5 +1,5 @@ import { Meta, StoryObj } from '@storybook/react'; -import ImportantLinks from 'src/views/components/ImportantLinks'; +import ImportantLinks from 'src/views/components/calendar/ImportantLinks'; const meta = { title: 'Components/Common/ImportantLinks', diff --git a/src/views/components/PopupMain.tsx b/src/views/components/PopupMain.tsx index f831ed77..82edd17c 100644 --- a/src/views/components/PopupMain.tsx +++ b/src/views/components/PopupMain.tsx @@ -1,13 +1,14 @@ import React from 'react'; import { FaCalendarAlt, FaCog, FaRedo } from 'react-icons/fa'; // Added FaRedo for the refresh icon import { StatusIcon } from '@shared/util/icons'; +import { generateCourses } from 'src/stories/components/List.stories'; +import { Status } from 'src/shared/types/Course'; import ExtensionRoot from './common/ExtensionRoot/ExtensionRoot'; import PopupCourseBlock from './common/PopupCourseBlock/PopupCourseBlock'; import Text from './common/Text/Text'; import Divider from './common/Divider/Divider'; import logoImage from '../../assets/logo.png'; // Adjust the path as necessary import List from './common/List/List'; // Ensure this path is correctly pointing to your List component -import { generateCourses } from 'src/stories/components/List.stories'; export default function PopupMain() { const courses = generateCourses(5); @@ -52,7 +53,7 @@ return (
-
+
MAIN SCHEDULE:
22 HOURS @@ -67,22 +68,22 @@ return ( listWidth={350} // Adjust based on your layout/design gap={12} // Spacing between items /> -
+
- +
WAITLISTED
- +
CLOSED
- +
CANCELLED
@@ -90,7 +91,7 @@ return (
DATA UPDATED ON: 12:00 AM 02/01/2024 - +
diff --git a/src/views/components/common/CalendarBottomBar/CalendarBottomBar.tsx b/src/views/components/calendar/CalendarBottomBar/CalendarBottomBar.tsx similarity index 94% rename from src/views/components/common/CalendarBottomBar/CalendarBottomBar.tsx rename to src/views/components/calendar/CalendarBottomBar/CalendarBottomBar.tsx index 5b99ab8d..8bf5962b 100644 --- a/src/views/components/common/CalendarBottomBar/CalendarBottomBar.tsx +++ b/src/views/components/calendar/CalendarBottomBar/CalendarBottomBar.tsx @@ -1,8 +1,8 @@ import React from 'react'; import clsx from 'clsx'; -import Text from '../Text/Text'; +import Text from '../../common/Text/Text'; import CalendarCourseBlock, { CalendarCourseCellProps } from '../CalendarCourseCell/CalendarCourseCell'; -import { Button } from '../Button/Button'; +import { Button } from '../../common/Button/Button'; import ImageIcon from '~icons/material-symbols/image'; import CalendarMonthIcon from '~icons/material-symbols/calendar-month'; diff --git a/src/views/components/common/CalendarCourseBlock/CalendarCourseMeeting.module.scss b/src/views/components/calendar/CalendarCourseBlock/CalendarCourseMeeting.module.scss similarity index 100% rename from src/views/components/common/CalendarCourseBlock/CalendarCourseMeeting.module.scss rename to src/views/components/calendar/CalendarCourseBlock/CalendarCourseMeeting.module.scss diff --git a/src/views/components/common/CalendarCourseBlock/CalendarCourseMeeting.tsx b/src/views/components/calendar/CalendarCourseBlock/CalendarCourseMeeting.tsx similarity index 100% rename from src/views/components/common/CalendarCourseBlock/CalendarCourseMeeting.tsx rename to src/views/components/calendar/CalendarCourseBlock/CalendarCourseMeeting.tsx diff --git a/src/views/components/common/CalendarCourseCell/CalendarCourseCell.tsx b/src/views/components/calendar/CalendarCourseCell/CalendarCourseCell.tsx similarity index 98% rename from src/views/components/common/CalendarCourseCell/CalendarCourseCell.tsx rename to src/views/components/calendar/CalendarCourseCell/CalendarCourseCell.tsx index 1ea60c25..da9db25f 100644 --- a/src/views/components/common/CalendarCourseCell/CalendarCourseCell.tsx +++ b/src/views/components/calendar/CalendarCourseCell/CalendarCourseCell.tsx @@ -5,7 +5,7 @@ import { CourseColors, pickFontColor } from 'src/shared/util/colors'; import ClosedIcon from '~icons/material-symbols/lock'; import WaitlistIcon from '~icons/material-symbols/timelapse'; import CancelledIcon from '~icons/material-symbols/warning'; -import Text from '../Text/Text'; +import Text from '../../common/Text/Text'; export interface CalendarCourseCellProps { courseDeptAndInstr: string; diff --git a/src/views/components/common/CalendarGrid/CalendarGrid.module.scss b/src/views/components/calendar/CalendarGrid/CalendarGrid.module.scss similarity index 100% rename from src/views/components/common/CalendarGrid/CalendarGrid.module.scss rename to src/views/components/calendar/CalendarGrid/CalendarGrid.module.scss diff --git a/src/views/components/common/CalendarGrid/CalendarGrid.tsx b/src/views/components/calendar/CalendarGrid/CalendarGrid.tsx similarity index 100% rename from src/views/components/common/CalendarGrid/CalendarGrid.tsx rename to src/views/components/calendar/CalendarGrid/CalendarGrid.tsx diff --git a/src/views/components/common/CalendarGridCell/CalendarGridCell.module.scss b/src/views/components/calendar/CalendarGridCell/CalendarGridCell.module.scss similarity index 100% rename from src/views/components/common/CalendarGridCell/CalendarGridCell.module.scss rename to src/views/components/calendar/CalendarGridCell/CalendarGridCell.module.scss diff --git a/src/views/components/common/CalendarGridCell/CalendarGridCell.tsx b/src/views/components/calendar/CalendarGridCell/CalendarGridCell.tsx similarity index 100% rename from src/views/components/common/CalendarGridCell/CalendarGridCell.tsx rename to src/views/components/calendar/CalendarGridCell/CalendarGridCell.tsx diff --git a/src/views/components/common/CalendarHeader/CalenderHeader.tsx b/src/views/components/calendar/CalendarHeader/CalenderHeader.tsx similarity index 87% rename from src/views/components/common/CalendarHeader/CalenderHeader.tsx rename to src/views/components/calendar/CalendarHeader/CalenderHeader.tsx index 7f11d348..29ba99c3 100644 --- a/src/views/components/common/CalendarHeader/CalenderHeader.tsx +++ b/src/views/components/calendar/CalendarHeader/CalenderHeader.tsx @@ -1,15 +1,15 @@ import React from 'react'; import { Status } from '@shared/types/Course'; -import Divider from '../Divider/Divider'; -import { Button } from '../Button/Button'; -import Text from '../Text/Text'; +import Divider from '../../common/Divider/Divider'; +import { Button } from '../../common/Button/Button'; +import Text from '../../common/Text/Text'; import MenuIcon from '~icons/material-symbols/menu'; import LogoIcon from '~icons/material-symbols/add-circle-outline'; import UndoIcon from '~icons/material-symbols/undo'; import RedoIcon from '~icons/material-symbols/redo'; import SettingsIcon from '~icons/material-symbols/settings'; -import ScheduleTotalHoursAndCourses from '../ScheduleTotalHoursAndCourses/ScheduleTotalHoursAndCourses'; -import CourseStatus from '../CourseStatus/CourseStatus'; +import ScheduleTotalHoursAndCourses from '../../common/ScheduleTotalHoursAndCourses/ScheduleTotalHoursAndCourses'; +import CourseStatus from '../../common/CourseStatus/CourseStatus'; const CalendarHeader = () => (
diff --git a/src/views/components/common/CalendarSchedules/CalendarSchedules.tsx b/src/views/components/calendar/CalendarSchedules/CalendarSchedules.tsx similarity index 82% rename from src/views/components/common/CalendarSchedules/CalendarSchedules.tsx rename to src/views/components/calendar/CalendarSchedules/CalendarSchedules.tsx index f9a84e95..25b74ea7 100644 --- a/src/views/components/common/CalendarSchedules/CalendarSchedules.tsx +++ b/src/views/components/calendar/CalendarSchedules/CalendarSchedules.tsx @@ -1,9 +1,9 @@ import { UserSchedule } from '@shared/types/UserSchedule'; import React, { useState } from 'react'; import AddSchedule from '~icons/material-symbols/add'; -import List from '../List/List'; -import ScheduleListItem from '../ScheduleListItem/ScheduleListItem'; -import Text from '../Text/Text'; +import List from '../../common/List/List'; +import ScheduleListItem from '../../common/ScheduleListItem/ScheduleListItem'; +import Text from '../../common/Text/Text'; export type Props = { style?: React.CSSProperties; @@ -16,7 +16,7 @@ export function CalendarSchedules(props: Props) { const [schedules, setSchedules] = useState(props.dummySchedules || []); const scheduleComponents = schedules.map((schedule, index) => ( - + )); return ( diff --git a/src/views/components/ImportantLinks.tsx b/src/views/components/calendar/ImportantLinks.tsx similarity index 98% rename from src/views/components/ImportantLinks.tsx rename to src/views/components/calendar/ImportantLinks.tsx index f301a54d..a111ab08 100644 --- a/src/views/components/ImportantLinks.tsx +++ b/src/views/components/calendar/ImportantLinks.tsx @@ -1,6 +1,6 @@ import React from 'react'; import clsx from 'clsx'; -import Text from './common/Text/Text'; +import Text from '../common/Text/Text'; import OutwardArrowIcon from '~icons/material-symbols/arrow-outward'; type Props = { diff --git a/src/views/hooks/useFlattenedCourseSchedule.ts b/src/views/hooks/useFlattenedCourseSchedule.ts index da1a3bb3..5b4a6c4a 100644 --- a/src/views/hooks/useFlattenedCourseSchedule.ts +++ b/src/views/hooks/useFlattenedCourseSchedule.ts @@ -1,4 +1,4 @@ -import { CalendarCourseCellProps } from 'src/views/components/common/CalendarCourseCell/CalendarCourseCell'; +import { CalendarCourseCellProps } from 'src/views/components/calendar/CalendarCourseCell/CalendarCourseCell'; import useSchedules from './useSchedules'; const dayToNumber: { [day: string]: number } = {