{props.label}
diff --git a/apps/antalmanac/src/components/RightPane/SectionTable/SectionTableBody.tsx b/apps/antalmanac/src/components/RightPane/SectionTable/SectionTableBody.tsx
index 79cc5f140..d1d1b1dce 100644
--- a/apps/antalmanac/src/components/RightPane/SectionTable/SectionTableBody.tsx
+++ b/apps/antalmanac/src/components/RightPane/SectionTable/SectionTableBody.tsx
@@ -25,7 +25,7 @@ import { ColorAndDelete, ScheduleAddCell } from './SectionTableButtons';
import restrictionsMapping from './static/restrictionsMapping.json';
import GradesPopup from './GradesPopup';
import analyticsEnum, { logAnalytics } from '$lib/analytics';
-import { clickToCopy, isDarkMode } from '$lib/helpers';
+import { clickToCopy } from '$lib/helpers';
import { CourseDetails } from '$lib/course_data.types';
import Grades from '$lib/grades';
import AppStore from '$stores/AppStore';
@@ -33,7 +33,7 @@ import { useTabStore } from '$stores/TabStore';
import locationIds from '$lib/location_ids';
import { normalizeTime, parseDaysString, formatTimes } from '$stores/calendarizeHelpers';
import useColumnStore, { type SectionTableColumn } from '$stores/ColumnStore';
-import { usePreviewStore, useTimeFormatStore } from '$stores/SettingsStore';
+import { usePreviewStore, useTimeFormatStore, useThemeStore } from '$stores/SettingsStore';
import { useHoveredStore } from '$stores/HoveredStore';
const styles: Styles
= (theme) => ({
@@ -41,7 +41,6 @@ const styles: Styles = (theme) => ({
display: 'inline-flex',
cursor: 'pointer',
'&:hover': {
- color: isDarkMode() ? 'gold' : 'blueviolet',
cursor: 'pointer',
},
alignSelf: 'center',
@@ -51,23 +50,12 @@ const styles: Styles = (theme) => ({
backgroundColor: theme.palette.action.hover,
},
},
- tr: {
- '&.addedCourse': {
- background: isDarkMode() ? '#b0b04f' : '#fcfc97',
- },
- '&.scheduleConflict': {
- background: isDarkMode() ? '#121212' : '#a0a0a0',
- opacity: isDarkMode() ? 0.6 : 1,
- },
- },
cell: {},
link: {
textDecoration: 'underline',
- color: isDarkMode() ? 'dodgerblue' : 'blue',
cursor: 'pointer',
},
mapLink: {
- color: isDarkMode() ? 'dodgerblue' : 'blue',
cursor: 'pointer',
background: 'none !important',
border: 'none',
@@ -101,7 +89,6 @@ const styles: Styles = (theme) => ({
Tap: { color: '#8d2df0' },
Tut: { color: '#ffc705' },
popoverText: {
- color: isDarkMode() ? 'dodgerblue' : 'blue',
cursor: 'pointer',
},
codeCell: {
@@ -122,8 +109,20 @@ interface CourseCodeCellProps {
}
const CourseCodeCell = withStyles(styles)((props: CourseCodeCellProps) => {
+ const isDark = useThemeStore((store) => store.isDark);
+
const { classes, sectionCode } = props;
+ const [isHovered, setIsHovered] = useState(false);
+
+ const handleMouseEnter = () => {
+ setIsHovered(true);
+ };
+
+ const handleMouseLeave = () => {
+ setIsHovered(false);
+ };
+
return (
@@ -137,6 +136,11 @@ const CourseCodeCell = withStyles(styles)((props: CourseCodeCellProps) => {
}}
className={classes.sectionCode}
label={sectionCode}
+ onMouseEnter={handleMouseEnter}
+ onMouseLeave={handleMouseLeave}
+ style={{
+ color: isHovered ? (isDark ? 'gold' : 'blueviolet') : '',
+ }}
size="small"
/>
@@ -233,6 +237,8 @@ interface GPACellProps {
}
function GPACell(props: GPACellProps) {
+ const isDark = useThemeStore((store) => store.isDark);
+
const { deptCode, courseNumber, instructors } = props;
const [gpa, setGpa] = useState('');
@@ -264,7 +270,7 @@ function GPACell(props: GPACellProps) {