Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

### 🔧 Internal changes

- Simplified timetable availability check in `Description.tsx` by removing redundant `Object.keys(sessions).length !== 0` condition
- Updated OpenStreetMap tile layer URL from HTTP to HTTPS in `CampusMap.tsx` for improved security
- Extracted read-only selection, prerequisite, and status computations (`isSelected`, `arePrereqsSatisfied*`, `compute*Status`, `totalSelectedCredits`) from `Graph.js` into a typed `graphState.ts` module
- Fixed lint-staged pre-commit hook running Prettier and ESLint over the whole repository instead of only staged files, and added `pnpm-lock.yaml` to `.prettierignore`
- Extracted the root `<svg>` setup (viewBox calculation, shared filters/markers) of `Graph.js` into a typed `GraphCanvas.tsx` component
Expand Down
2 changes: 1 addition & 1 deletion js/components/common/CampusMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export function CampusMap({
dragging={true}
ref={mapRef}
>
<TileLayer url="http://{s}.tile.osm.org/{z}/{x}/{y}.png" />
<TileLayer url="https://{s}.tile.osm.org/{z}/{x}/{y}.png" />
<FeatureGroup ref={groupRef}>{locationMarkers}</FeatureGroup>
</MapContainer>
<button id="zoom-button" onClick={zoomToFit}>
Expand Down
5 changes: 1 addition & 4 deletions js/components/common/Description.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@ interface DescriptionProps {
*/
export function Description({ course, sessions }: DescriptionProps): JSX.Element {
const timetableUnavailable =
Object.keys(sessions).length !== 0 &&
!sessions.F?.length &&
!sessions.S?.length &&
!sessions.Y?.length
!sessions.F?.length && !sessions.S?.length && !sessions.Y?.length

let timetableDisplay
if (timetableUnavailable) {
Expand Down
Loading