diff --git a/apps/antalmanac/src/actions/ActionTypesStore.ts b/apps/antalmanac/src/actions/ActionTypesStore.ts index 1515d30f2..54b6ddb89 100644 --- a/apps/antalmanac/src/actions/ActionTypesStore.ts +++ b/apps/antalmanac/src/actions/ActionTypesStore.ts @@ -1,5 +1,7 @@ import { EventEmitter } from 'events'; + import { RepeatingCustomEvent, ScheduleCourse } from '@packages/antalmanac-types'; + import { autoSaveSchedule } from '$actions/AppStoreActions'; import AppStore from '$stores/AppStore'; diff --git a/apps/antalmanac/src/actions/AppStoreActions.ts b/apps/antalmanac/src/actions/AppStoreActions.ts index 24c3814bc..40f53bcbb 100644 --- a/apps/antalmanac/src/actions/AppStoreActions.ts +++ b/apps/antalmanac/src/actions/AppStoreActions.ts @@ -1,16 +1,16 @@ -import { VariantType } from 'notistack'; - -import { TRPCError } from '@trpc/server'; -import { WebsocSection } from 'peterportal-api-next-types'; import { ScheduleCourse } from '@packages/antalmanac-types'; import { RepeatingCustomEvent } from '@packages/antalmanac-types'; +import { TRPCError } from '@trpc/server'; +import { VariantType } from 'notistack'; +import { WebsocSection } from 'peterportal-api-next-types'; + import { SnackbarPosition } from '$components/NotificationSnackbar'; import analyticsEnum, { logAnalytics } from '$lib/analytics'; -import { warnMultipleTerms } from '$lib/helpers'; +import { courseNumAsDecimal } from '$lib/analytics'; +import trpc from '$lib/api/trpc'; import { CourseDetails } from '$lib/course_data.types'; +import { warnMultipleTerms } from '$lib/helpers'; import AppStore from '$stores/AppStore'; -import trpc from '$lib/api/trpc'; -import { courseNumAsDecimal } from '$lib/analytics'; export interface CopyScheduleOptions { onSuccess: (index: number) => unknown; diff --git a/apps/antalmanac/src/components/Calendar/CalendarRoot.tsx b/apps/antalmanac/src/components/Calendar/CalendarRoot.tsx index e7379d420..510e6eee2 100644 --- a/apps/antalmanac/src/components/Calendar/CalendarRoot.tsx +++ b/apps/antalmanac/src/components/Calendar/CalendarRoot.tsx @@ -8,11 +8,12 @@ import { Calendar, DateLocalizer, momentLocalizer, Views } from 'react-big-calen import CalendarToolbar from './CalendarToolbar'; import CourseCalendarEvent, { CalendarEvent, CourseEvent } from './CourseCalendarEvent'; + +import locationIds from '$lib/location_ids'; import { getDefaultFinalsStartDate, getFinalsStartDateForTerm } from '$lib/termData'; import AppStore from '$stores/AppStore'; -import locationIds from '$lib/location_ids'; -import { useTimeFormatStore } from '$stores/SettingsStore'; import { useHoveredStore } from '$stores/HoveredStore'; +import { useTimeFormatStore } from '$stores/SettingsStore'; const localizer = momentLocalizer(moment); diff --git a/apps/antalmanac/src/components/Calendar/Toolbar/CustomEventDialog/DaySelector.tsx b/apps/antalmanac/src/components/Calendar/Toolbar/CustomEventDialog/DaySelector.tsx index 801783353..a1a81497d 100644 --- a/apps/antalmanac/src/components/Calendar/Toolbar/CustomEventDialog/DaySelector.tsx +++ b/apps/antalmanac/src/components/Calendar/Toolbar/CustomEventDialog/DaySelector.tsx @@ -1,5 +1,6 @@ import { Button, Box } from '@material-ui/core'; import React, { useEffect, useState } from 'react'; + import { useThemeStore } from '$stores/SettingsStore'; const normal_days = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']; diff --git a/apps/antalmanac/src/components/Header/LoadSaveFunctionality.tsx b/apps/antalmanac/src/components/Header/LoadSaveFunctionality.tsx index db56c151b..cdc1eb0a3 100644 --- a/apps/antalmanac/src/components/Header/LoadSaveFunctionality.tsx +++ b/apps/antalmanac/src/components/Header/LoadSaveFunctionality.tsx @@ -11,13 +11,13 @@ import { FormControlLabel, } from '@material-ui/core'; import { CloudDownload, Save } from '@material-ui/icons'; +import { LoadingButton } from '@mui/lab'; import { ChangeEvent, PureComponent, useEffect, useState } from 'react'; -import { LoadingButton } from '@mui/lab'; +import actionTypesStore from '$actions/ActionTypesStore'; import { loadSchedule, saveSchedule } from '$actions/AppStoreActions'; -import { useThemeStore } from '$stores/SettingsStore'; import AppStore from '$stores/AppStore'; -import actionTypesStore from '$actions/ActionTypesStore'; +import { useThemeStore } from '$stores/SettingsStore'; interface LoadSaveButtonBaseProps { action: typeof saveSchedule; diff --git a/apps/antalmanac/src/components/Header/SettingsMenu.tsx b/apps/antalmanac/src/components/Header/SettingsMenu.tsx index 5b45197a3..02a36c53c 100644 --- a/apps/antalmanac/src/components/Header/SettingsMenu.tsx +++ b/apps/antalmanac/src/components/Header/SettingsMenu.tsx @@ -1,14 +1,14 @@ -import { useCallback, useState } from 'react'; import { Box, Button, ButtonGroup, Drawer, IconButton, Switch, Typography, useMediaQuery } from '@material-ui/core'; -import { Divider, Stack, Tooltip } from '@mui/material'; import { CSSProperties } from '@material-ui/core/styles/withStyles'; import { Close, DarkMode, Help, LightMode, Settings, SettingsBrightness } from '@mui/icons-material'; +import { Divider, Stack, Tooltip } from '@mui/material'; +import { useCallback, useState } from 'react'; -import { usePreviewStore, useThemeStore, useTimeFormatStore, useAutoSaveStore } from '$stores/SettingsStore'; -import useCoursePaneStore from '$stores/CoursePaneStore'; -import appStore from '$stores/AppStore'; import actionTypesStore from '$actions/ActionTypesStore'; import { autoSaveSchedule } from '$actions/AppStoreActions'; +import appStore from '$stores/AppStore'; +import useCoursePaneStore from '$stores/CoursePaneStore'; +import { usePreviewStore, useThemeStore, useTimeFormatStore, useAutoSaveStore } from '$stores/SettingsStore'; const lightSelectedStyle: CSSProperties = { backgroundColor: '#F0F7FF', diff --git a/apps/antalmanac/src/components/RightPane/CoursePane/CourseRenderPane.tsx b/apps/antalmanac/src/components/RightPane/CoursePane/CourseRenderPane.tsx index bd99c5fbe..010daefef 100644 --- a/apps/antalmanac/src/components/RightPane/CoursePane/CourseRenderPane.tsx +++ b/apps/antalmanac/src/components/RightPane/CoursePane/CourseRenderPane.tsx @@ -1,25 +1,27 @@ -import { useCallback, useEffect, useState } from 'react'; -import LazyLoad from 'react-lazyload'; - -import { Alert, Box, GlobalStyles, IconButton, useMediaQuery } from '@mui/material'; import { Close } from '@mui/icons-material'; +import { Alert, Box, IconButton, useMediaQuery } from '@mui/material'; import { AACourse, AASection } from '@packages/antalmanac-types'; import { WebsocDepartment, WebsocSchool, WebsocAPIResponse, GE } from 'peterportal-api-next-types'; +import { useCallback, useEffect, useState } from 'react'; +import LazyLoad from 'react-lazyload'; + import RightPaneStore from '../RightPaneStore'; import GeDataFetchProvider from '../SectionTable/GEDataFetchProvider'; import SectionTableLazyWrapper from '../SectionTable/SectionTableLazyWrapper'; + import SchoolDeptCard from './SchoolDeptCard'; import darkModeLoadingGif from './SearchForm/Gifs/dark-loading.gif'; import loadingGif from './SearchForm/Gifs/loading.gif'; import darkNoNothing from './static/dark-no_results.png'; import noNothing from './static/no_results.png'; -import AppStore from '$stores/AppStore'; -import { useThemeStore } from '$stores/SettingsStore'; -import Grades from '$lib/grades'; -import analyticsEnum from '$lib/analytics'; + import { openSnackbar } from '$actions/AppStoreActions'; +import analyticsEnum from '$lib/analytics'; +import Grades from '$lib/grades'; import WebSOC from '$lib/websoc'; +import AppStore from '$stores/AppStore'; import { useHoveredStore } from '$stores/HoveredStore'; +import { useThemeStore } from '$stores/SettingsStore'; function getColors() { const courseColors = AppStore.schedule.getCurrentCourses().reduce( @@ -285,7 +287,6 @@ export default function CourseRenderPane(props: { id?: number }) { - {courseData.map((_: WebsocSchool | WebsocDepartment | AACourse, index: number) => { let heightEstimate = 200; if ((courseData[index] as AACourse).sections !== undefined) diff --git a/apps/antalmanac/src/components/RightPane/RightPaneRoot.tsx b/apps/antalmanac/src/components/RightPane/RightPaneRoot.tsx index 0bde00518..24693c08f 100644 --- a/apps/antalmanac/src/components/RightPane/RightPaneRoot.tsx +++ b/apps/antalmanac/src/components/RightPane/RightPaneRoot.tsx @@ -1,14 +1,17 @@ -import { Link } from 'react-router-dom'; import { Box, Paper, Tab, Tabs, Typography } from '@material-ui/core'; import { FormatListBulleted, MyLocation, Search } from '@material-ui/icons'; +import { GlobalStyles } from '@mui/material'; import React, { Suspense } from 'react'; +import { Link } from 'react-router-dom'; import AddedCoursePane from './AddedCourses/AddedCoursePane'; import CoursePane from './CoursePane/CoursePaneRoot'; import darkModeLoadingGif from './CoursePane/SearchForm/Gifs/dark-loading.gif'; import loadingGif from './CoursePane/SearchForm/Gifs/loading.gif'; -import { useTabStore } from '$stores/TabStore'; + import { useThemeStore } from '$stores/SettingsStore'; +import { useTabStore } from '$stores/TabStore'; + const UCIMap = React.lazy(() => import('../Map')); @@ -60,6 +63,7 @@ export default function Desktop({ style }: DesktopTabsProps) { return ( +