Skip to content

Commit bfb9bf6

Browse files
committed
undo test return & prettier
1 parent 3ef0aa9 commit bfb9bf6

File tree

2 files changed

+26
-29
lines changed

2 files changed

+26
-29
lines changed

Diff for: src/components/search/Filters/filters.tsx

-5
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,6 @@ export function getCurrentSemester() {
3737
season = 'S';
3838
else season = 'F';
3939

40-
return {
41-
season: "F",
42-
yyyy: 2024
43-
}
4440
return {
4541
season: season,
4642
yyyy: yyyy,
@@ -77,7 +73,6 @@ export function getNextLongSemester(season: string, yyyy: number) {
7773
};
7874
}
7975

80-
8176
/** A comparator function used when sorting semesters by name. Returns -1 if semester 'a' is more older than semester 'b'. */
8277
export function compareSemesters(a: string, b: string) {
8378
const x = a.substring(0, 2).localeCompare(b.substring(0, 2));

Diff for: src/components/search/SearchResultsTable/searchResultsTable.tsx

+26-24
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ function Row({
161161
section.professors.includes(professor.data._id),
162162
);
163163
// if upcoming semester
164-
const upcomingSemester = (nextSemester.yyyy % 100) + nextSemester.season
164+
const upcomingSemester = (nextSemester.yyyy % 100) + nextSemester.season;
165165
if (
166166
professorSections.filter(
167167
(section) => section.academic_session.name == upcomingSemester,
@@ -286,29 +286,31 @@ function Row({
286286
)) ||
287287
(grades.state === 'done' && (
288288
<>
289-
<Tooltip
290-
title={
291-
'Last taught in: ' +
292-
displayAcademicSessionName(most_recent_semester, false)
293-
}
294-
placement="top"
295-
>
296-
<Typography className="text-xs text-black text-center rounded-full px-1 py-1 ml-1 w-8 block bg-cornflower-50">
297-
{most_recent_semester}
298-
</Typography>
299-
</Tooltip>
300-
{teachingNextSemester && <Tooltip
301-
title={
302-
'Also teaching in ' +
303-
displayAcademicSessionName(teachingNextSemester, false)
304-
}
305-
placement="top"
306-
>
307-
<Typography className="text-xs text-black text-center rounded-full px-1 py-1 ml-1 w-8 block bg-cornflower-400">
308-
{teachingNextSemester}
309-
</Typography>
310-
</Tooltip>}
311-
</>
289+
<Tooltip
290+
title={
291+
'Last taught in: ' +
292+
displayAcademicSessionName(most_recent_semester, false)
293+
}
294+
placement="top"
295+
>
296+
<Typography className="text-xs text-black text-center rounded-full px-1 py-1 ml-1 w-8 block bg-cornflower-50">
297+
{most_recent_semester}
298+
</Typography>
299+
</Tooltip>
300+
{teachingNextSemester && (
301+
<Tooltip
302+
title={
303+
'Also teaching in ' +
304+
displayAcademicSessionName(teachingNextSemester, false)
305+
}
306+
placement="top"
307+
>
308+
<Typography className="text-xs text-black text-center rounded-full px-1 py-1 ml-1 w-8 block bg-cornflower-400">
309+
{teachingNextSemester}
310+
</Typography>
311+
</Tooltip>
312+
)}
313+
</>
312314
)) ||
313315
null}
314316
</div>

0 commit comments

Comments
 (0)