Skip to content

Conversation

@sjain2025
Copy link

PR for testing on mobile (feature in progress)

@vercel
Copy link

vercel bot commented Nov 8, 2025

@sjain2025 is attempting to deploy a commit to the ScottyLabs Team on Vercel.

A member of the Team first needs to authorize it.

Comment on lines +29 to +58
if (location.name === "Stack'd Dessert Bar" && stackUnderground?.coordinates) {
return {
...location,
coordinates: stackUnderground.coordinates,
};
}
if (location.name === 'Zebra Lounge' && exchange?.coordinates) {
return {
...location,
coordinates: exchange.coordinates,
};
}
if (location.name === 'Sweet Plantain' && tasteOfIndia?.coordinates) {
return {
...location,
coordinates: tasteOfIndia.coordinates,
};
}
if (location.name === "De Fer Coffee & Tea At Resnik" && tasteOfIndia?.coordinates) {
return {
...location,
coordinates: tasteOfIndia.coordinates,
};
}
if (location.name === 'E.a.t. (evenings At Tepper) - Rohr Commons' && tepperTaqueria?.coordinates) {
return {
...location,
coordinates: tepperTaqueria.coordinates,
};
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are these coordinate overwrites here because cmumaps can't accept the non-ovewritten coordinates?

Comment on lines +120 to +128
server: {
proxy: {
'/api/cmu-maps': {
target: 'https://rust.api.maps.scottylabs.org',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api\/cmu-maps/, ''),
secure: true,
},
},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interesting! why proxy cmumaps requests through cmueats this way?

Comment on lines +1 to +32
interface CMUMapsApiResponse {
Fastest: {
path: {
path: Array<{
id: string;
coordinate: {
latitude: number;
longitude: number;
};
floor: {
buildingCode: string;
level: string;
};
roomId: string;
neighbors: Record<
string,
{
dist: number;
toFloorInfo: any;
}
>;
}>;
distance: number;
};
instructions: Array<{
action: string;
distance: number;
node_id: string;
}>;
};
}

Copy link
Collaborator

@cirex-web cirex-web Nov 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we write this as a zod schema so we can parse and validate the api response for full typesafety? (or if cmumaps has an openapi schema, we can use that as well)

@media screen and (max-width: 900px) {
.Locations-header__filters {
flex-direction: column;
gap: 0.5rem;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just an fyi, cmueats has opted to use px for everything for consistency

@cirex-web
Copy link
Collaborator

goated feature

Comment on lines +70 to +77
const getPriority = (state: LocationState) => {
if (state === LocationState.OPEN
|| state === LocationState.CLOSES_SOON) return 0;
if (state === LocationState.OPENS_SOON) return 1;
if (state === LocationState.CLOSED
|| state === LocationState.CLOSED_LONG_TERM) return 2;
return 3;
};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good - although this feels inverted since higher priority elements are sorted last lmao

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants