Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Mobility page for ISBs, MRT info #3712

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
c4b173e
feat: ✨ basic implementation of mobility page (for ISBs)
kagiura Mar 20, 2024
3dff9b9
Merge branch 'nusmodifications:master' into kagiura/mobility
kagiura Mar 20, 2024
ff85d74
refactor: 🚨 fixed dependency loop + fixed SVCs with gaps during the d…
kagiura Mar 20, 2024
638bda3
refactor: ♻️ refactoring bus apis / util functions
kagiura Mar 20, 2024
a5ad7e4
refactor: ♻️ separate api errors and actually having no more buses
kagiura Mar 20, 2024
c55f339
chore: 🗃️ update schedule
kagiura Mar 20, 2024
04768a2
fix: 👽️ new proxy api base url added
kagiura Mar 27, 2024
c78cf10
refactor: ✨ show which services are directly accessible from any sele…
kagiura Mar 27, 2024
48c3054
fix: 🐛 bug fixes (auto campus switch, term/holiday distinction)
kagiura Apr 8, 2024
02db0bc
refactor: ♻️ refactored + optimized the isb pages
kagiura Apr 8, 2024
792bbef
feat: 🍱 added bus icons (no implementation yet)
kagiura Apr 8, 2024
871a026
fix: 🐛 fix mobile having slight horizontal scrolll
kagiura Apr 8, 2024
1561da9
refactor: 💄 only hide footer on desktop (where it doesn't fit)
kagiura Apr 8, 2024
0cf08a5
Merge branch 'master' into kagiura/mobility
kagiura Apr 9, 2024
d2d5d16
Merge branch 'master' into kagiura/mobility
zwliew Jul 30, 2024
4bb1e12
Regenerate yarn.lock
zwliew Jul 30, 2024
949936a
Remove erroneous package.json
zwliew Jul 30, 2024
a8bedd4
Add missing ArrivalTimes.scss file
zwliew Jul 30, 2024
81cfe10
Clean up linting warnings
zwliew Jul 30, 2024
d81a0f4
Address styling linting warnings
zwliew Jul 30, 2024
d44bc7e
Navtab: Fix tests
zwliew Aug 1, 2024
c86a0bd
Regenerate yarn.lock
zwliew Aug 1, 2024
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
3,120 changes: 3,120 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@
"json2mq": "0.2.0",
"leaflet": "1.9.4",
"leaflet-gesture-handling": "1.2.2",
"leaflet-polylineoffset": "^1.1.1",
"lodash": "4.17.21",
"mousetrap": "1.6.5",
"nusmoderator": "3.0.0",
Expand Down
26 changes: 26 additions & 0 deletions website/src/apis/nextbus-new.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
const baseURL = 'https://nnextbus.nusmods.com'; // TODO: wait until we have an api proxy

export const getStopTimings = async (
stop: string,
callback?: (data: unknown) => void,
error?: (e: unknown) => void,
) => {
if (!stop) return;
// TODO: wait until we have an api proxy
// const API_AUTH = '';
try {
const headers = {
// headers: {
// authorization: API_AUTH,
// accept: 'application/json',
// },
};
const response = await fetch(`${baseURL}/ShuttleService?busstopname=${stop}`, headers);
const data = await response.json();
// console.log(data);
if (callback) callback(data.ShuttleServiceResult);
} catch (e) {
// console.error(e);
if (error) error(e);
}
};
Loading