Skip to content

Commit

Permalink
ran format
Browse files Browse the repository at this point in the history
  • Loading branch information
RVC13850 committed Nov 9, 2024
1 parent dc0a442 commit d946189
Showing 1 changed file with 19 additions and 20 deletions.
39 changes: 19 additions & 20 deletions src/components/common/SearchResultsTable/searchResultsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
TableRow,
Tooltip,
Typography,
useMediaQuery
useMediaQuery,
} from '@mui/material';
import React, { useState } from 'react';

Expand Down Expand Up @@ -100,7 +100,6 @@ function Row({
const [open, setOpen] = useState(false);
const isSmallScreen = useMediaQuery('(max-width:600px)');


const rainbowColors = useRainbowColors();
const gpaToColor = (gpa: number): string => {
if (gpa >= 4.0) return rainbowColors[1];
Expand Down Expand Up @@ -140,14 +139,14 @@ function Row({
</Tooltip>
</TableCell>
<TableCell>
{isSmallScreen && (
{isSmallScreen && (
<Typography
className="leading-tight text-lg text-gray-600 dark:text-gray-200 cursor-text"
sx={{
whiteSpace: 'nowrap', // Prevents text from wrapping to a new line
whiteSpace: 'nowrap', // Prevents text from wrapping to a new line
}}
>
{searchQueryLabel(convertToProfOnly(course))}
{searchQueryLabel(convertToProfOnly(course))}
</Typography>
)}
<Tooltip
Expand Down Expand Up @@ -181,21 +180,21 @@ function Row({
</Tooltip>
</TableCell>
{!isSmallScreen && (
<TableCell component="th" scope="row">
<Typography
onClick={(e) => e.stopPropagation()} // prevents opening/closing the card when clicking on the text
className="leading-tight text-lg text-gray-600 dark:text-gray-200 cursor-text"
>
{searchQueryLabel(course) +
((typeof course.profFirst === 'undefined' &&
typeof course.profLast === 'undefined') ||
(typeof course.prefix === 'undefined' &&
typeof course.number === 'undefined')
? ' (Overall)'
: '')}
</Typography>
</TableCell>
)}
<TableCell component="th" scope="row">
<Typography
onClick={(e) => e.stopPropagation()} // prevents opening/closing the card when clicking on the text
className="leading-tight text-lg text-gray-600 dark:text-gray-200 cursor-text"
>
{searchQueryLabel(course) +
((typeof course.profFirst === 'undefined' &&
typeof course.profLast === 'undefined') ||
(typeof course.prefix === 'undefined' &&
typeof course.number === 'undefined')
? ' (Overall)'
: '')}
</Typography>
</TableCell>
)}
<TableCell align="right">
{((typeof grades === 'undefined' || grades.state === 'error') && (
<></>
Expand Down

1 comment on commit d946189

@RVC13850
Copy link
Contributor Author

@RVC13850 RVC13850 commented on d946189 Nov 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AbhiramTadepalli

Look into how the search results table headers should be formatted

Image

Please sign in to comment.