Skip to content

Commit

Permalink
Fix lag when going back from search results (#902)
Browse files Browse the repository at this point in the history
  • Loading branch information
js0mmer authored Feb 11, 2024
1 parent 8a4bfe6 commit 8adfee1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -281,6 +281,7 @@ export default function CourseRenderPane(props: { id?: number }) {
<RecruitmentBanner />
<Box>
<Box sx={{ height: '50px', marginBottom: '5px' }} />
<GlobalStyles styles={{ '*::-webkit-scrollbar': { height: '8px' } }} />
{courseData.map((_: WebsocSchool | WebsocDepartment | AACourse, index: number) => {
let heightEstimate = 200;
if ((courseData[index] as AACourse).sections !== undefined)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -129,7 +128,6 @@ function SectionTable(props: SectionTableProps) {

return (
<>
<GlobalStyles styles={{ '*::-webkit-scrollbar': { height: '8px' } }} />
<Box style={{ display: 'flex', gap: 4, marginTop: 4, marginBottom: 8 }}>
<CourseInfoBar
deptCode={courseDetails.deptCode}
Expand Down

0 comments on commit 8adfee1

Please sign in to comment.