From 8adfee16ce04764f56b8bd3322a90eac4bb24e98 Mon Sep 17 00:00:00 2001 From: Jacob Sommer Date: Sun, 11 Feb 2024 12:12:16 -0800 Subject: [PATCH] Fix lag when going back from search results (#902) --- .../src/components/RightPane/CoursePane/CourseRenderPane.tsx | 3 ++- .../src/components/RightPane/SectionTable/SectionTable.tsx | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/apps/antalmanac/src/components/RightPane/CoursePane/CourseRenderPane.tsx b/apps/antalmanac/src/components/RightPane/CoursePane/CourseRenderPane.tsx index d19ccb031..33b49df8b 100644 --- a/apps/antalmanac/src/components/RightPane/CoursePane/CourseRenderPane.tsx +++ b/apps/antalmanac/src/components/RightPane/CoursePane/CourseRenderPane.tsx @@ -1,7 +1,7 @@ import { useCallback, useEffect, useState } from 'react'; import LazyLoad from 'react-lazyload'; -import { Alert, Box, IconButton } from '@mui/material'; +import { Alert, Box, GlobalStyles, IconButton } from '@mui/material'; import { Close } from '@mui/icons-material'; import { AACourse, AASection } from '@packages/antalmanac-types'; import { WebsocDepartment, WebsocSchool, WebsocAPIResponse, GE } from 'peterportal-api-next-types'; @@ -281,6 +281,7 @@ 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/SectionTable/SectionTable.tsx b/apps/antalmanac/src/components/RightPane/SectionTable/SectionTable.tsx index 6119c66e7..8b7104433 100644 --- a/apps/antalmanac/src/components/RightPane/SectionTable/SectionTable.tsx +++ b/apps/antalmanac/src/components/RightPane/SectionTable/SectionTable.tsx @@ -13,7 +13,6 @@ import { useMediaQuery, } from '@material-ui/core'; import { Assessment, Help, RateReview, ShowChart as ShowChartIcon } from '@material-ui/icons'; -import { GlobalStyles } from '@mui/material'; import { MOBILE_BREAKPOINT } from '../../../globals'; import CourseInfoBar from './CourseInfoBar'; import CourseInfoButton from './CourseInfoButton'; @@ -129,7 +128,6 @@ function SectionTable(props: SectionTableProps) { return ( <> -