Skip to content

Commit

Permalink
Merge branch 'main' into 771-refactor-import
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinWu098 authored Jan 24, 2024
2 parents ff9fbaf + af8e096 commit 03edfe7
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const DaySelector: React.FC<DaySelectorProps> = ({

useEffect(() => {
onSelectDay(selectedDays);
}, [selectedDays]);
}, [onSelectDay, selectedDays]);

const handleChange = (dayIndex: number) => (event: React.ChangeEvent<HTMLInputElement>) => {
const newSelectedDays = [...selectedDays];
Expand Down
8 changes: 0 additions & 8 deletions apps/antalmanac/src/components/Calendar/calendar.css
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,6 @@
font-size: 0.9rem;
}

.rbc-time-header-gutter {
width: 42px;
}

.rbc-time-gutter {
width: 42px;
}

@media (min-resolution: 96dpi) {
.rbc-timeslot-group {
min-height: 28px;
Expand Down
19 changes: 11 additions & 8 deletions apps/antalmanac/src/components/Map/Map.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -289,13 +289,16 @@ export default function CourseMap() {
*/
const startDestPairs = useMemo(() => {
const allEvents = [...markersToDisplay, ...customEventMarkersToDisplay];
return allEvents.reduce((acc, cur, index) => {
acc.push([cur]);
if (index > 0) {
acc[index - 1].push(cur);
}
return acc;
}, [] as (typeof allEvents)[]);
return allEvents.reduce(
(acc, cur, index) => {
acc.push([cur]);
if (index > 0) {
acc[index - 1].push(cur);
}
return acc;
},
[] as (typeof allEvents)[]
);
}, [markersToDisplay, customEventMarkersToDisplay]);

return (
Expand Down Expand Up @@ -352,7 +355,7 @@ export default function CourseMap() {
<Fragment key={Object.values(marker).join('')}>
<LocationMarker
{...marker}
label={today === 'All' ? undefined : index + 1}
label={today === 'All' ? undefined : (index + 1).toString()}
stackIndex={coursesSameBuildingPrior.length}
>
<Box>
Expand Down
4 changes: 2 additions & 2 deletions apps/antalmanac/src/components/Map/Marker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const IMAGE_CMS_URL = 'https://cms.concept3d.com/map/lib/image-cache/i.php?mapId
/**
* returns a leaflet DivIcon that can replace the marker's default blue icon
*/
function getMarkerIcon(color = '', stackIndex = 1, label: any = '') {
function getMarkerIcon(color = '', stackIndex = 1, label = '') {
return Leaflet.divIcon({
/**
* Adds offset to __marker__ for stacking markers.
Expand Down Expand Up @@ -63,7 +63,7 @@ interface Props {
location?: string;
acronym?: string;
stackIndex?: number;
label?: any;
label?: string;
children?: React.ReactNode;
}

Expand Down
2 changes: 1 addition & 1 deletion apps/antalmanac/src/components/Map/Routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export default function ClassRoutes(props: ClassRoutesProps) {
return () => {
routerRef.current.instance.remove();
};
}, []);
}, [context.map, routerRef]);

return null;
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ class SectionCodeSearchBar extends PureComponent {
}

getSectionCode() {
return RightPaneStore.getUrlCourseCodeValue()
? this.updateCourseCodeAndGetFormData()
: RightPaneStore.getFormData().sectionCode;
return RightPaneStore.getUrlCourseCodeValue()
? this.updateCourseCodeAndGetFormData()
: RightPaneStore.getFormData().sectionCode;
}

state = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
:root {
--grey-light-theme: #8d8d8d;
--background-grey-light-theme: #e0e0e0;
}
}

.dependency-list-branch {
margin: auto;
}


.prereq-tree {
display: flex;
flex-direction: column;
Expand Down Expand Up @@ -72,7 +71,6 @@
height: 1px;
}


.course-node {
margin: auto 1rem auto 0;
}
Expand All @@ -85,7 +83,6 @@
margin-right: 0;
}


.dependency-node:first-child:last-child::after {
height: 0 !important;
}
Expand Down Expand Up @@ -194,10 +191,10 @@
}

.course {
border-radius: 3px;
font-size: .8rem;
font-weight: 500;
padding: 0.35rem;
border-radius: 3px;
font-size: 0.8rem;
font-weight: 500;
padding: 0.35rem;
}

.missing-tree {
Expand All @@ -209,4 +206,4 @@
/* Styling that targets the Popover component (not sure why it can't be done inline)*/
.MuiPopover-paper {
overflow-x: auto;
}
}

0 comments on commit 03edfe7

Please sign in to comment.