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

[Ready for Review] Update Map Documentation #384

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
8 changes: 6 additions & 2 deletions frontend/src/components/Apartment/MapInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,17 @@ const useStyles = makeStyles((theme) => ({
* This component is used in the ApartmentPage to display the map and location
* information of each apartment, including its location on Google Map, address,
* and time required for walking to campus from different Cornell landmarks.
* It uses Material-UI components for consistent styling.
* It uses Material-UI components for consistent styling and Google Maps React
* for map functionality.
*
* @param Props - Contains:
* - `address`: The address of the apartment.
* - `latitude`: The latitude of the apartment location.
* - `longitude`: The longitude of the apartment location.
* - `walkTime`: The walk time from the apartment to campus landmarks.
* - `travelTimes`: The travel times from the apartment to campus landmarks.
* - `handleClick`: Function to handle clicking the expand button to show full screen map view.
* - `mapToggle`: Boolean toggle used by parent component to trigger resetting map zoom/center.
* - `isMobile`: Boolean indicating if viewing on mobile device.
*/
function MapInfo({
address,
Expand Down
5 changes: 2 additions & 3 deletions frontend/src/components/Apartment/MapModal.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { Dispatch, SetStateAction, useRef } from 'react';

Check warning on line 1 in frontend/src/components/Apartment/MapModal.tsx

View workflow job for this annotation

GitHub Actions / lint

'Dispatch' is defined but never used

Check warning on line 1 in frontend/src/components/Apartment/MapModal.tsx

View workflow job for this annotation

GitHub Actions / lint

'SetStateAction' is defined but never used
import {
Box,
Grid,
Expand All @@ -22,7 +22,7 @@
import zoomOutIcon from '../../assets/zoom-out-icon.png';
import { Marker } from './Marker';
import blackPinIcon from '../../assets/ph_map-pin-fill.svg';
import { BaseProps, distanceProps } from './MapInfo';

Check warning on line 25 in frontend/src/components/Apartment/MapModal.tsx

View workflow job for this annotation

GitHub Actions / lint

'distanceProps' is defined but never used

const useStyles = makeStyles((theme) => ({
paper: {
Expand Down Expand Up @@ -131,12 +131,11 @@
* - `aptName`: The name of the apartment.
* - `open`: Boolean to control the visibility of the modal.
* - `onClose`: Function to handle closing the modal.
* - `setOpen`: Function to set the open state of the modal.
* - `address`: The address of the apartment.
* - `latitude`: The latitude of the apartment location (default: 0).
* - `longitude`: The longitude of the apartment location (default: 0).
* - `walkTime`: The walk time from the apartment to campus landmarks (default: 0).
* - `driveTime`: The drive time from the apartment to campus landmarks (default: 0).
* - `travelTimes`: Object containing walking times to campus landmarks.
* - `isMobile`: Boolean indicating if viewing on mobile device.
*/

const MapModal = ({
Expand Down
Loading