-
Notifications
You must be signed in to change notification settings - Fork 15
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
feat:types for map #1856
feat:types for map #1856
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sunilsabatp Please go through my comments.
src/features/user/TreeMapper/Import/components/PlantingLocation.tsx
Outdated
Show resolved
Hide resolved
src/features/user/TreeMapper/Import/components/PlantingLocation.tsx
Outdated
Show resolved
Hide resolved
src/features/user/TreeMapper/Import/components/MapComponent.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sunilsabatp Please take a look at the open comments here and previous ones as well
src/features/user/RegisterTrees/RegisterTrees/SingleContribution.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/features/user/RegisterTrees/RegisterTrees/SingleContribution.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor changes not merge-blockers
@@ -186,8 +191,12 @@ export default function ProjectsMap(): ReactElement { | |||
</div> | |||
{showDetails.show && ( | |||
<Popup | |||
latitude={showDetails.coordinates[1]} | |||
longitude={showDetails.coordinates[0]} | |||
latitude={ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On line number 161 onStateChange
is not a part of the MapGL props
const [open, setOpen] = React.useState(false); | ||
const buttonRef = React.useRef<HTMLButtonElement>(null); | ||
const { embed, callbackUrl } = React.useContext(ParamsContext); | ||
|
||
const handleClose = () => { | ||
setOpen(false); | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In markerBackgroundColor
parameter project
implicitly has an 'any'
@@ -30,6 +30,7 @@ export default function PlantLocations(): ReactElement { | |||
const { i18n, t } = useTranslation(['maps', 'common']); | |||
|
|||
const openPl = (pl: PlantLocationSingle | SamplePlantLocation) => { | |||
console.log(pl, '=='); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clean up needed
@@ -231,7 +232,10 @@ export default function PlantLocations(): ReactElement { | |||
{viewport.zoom > 14 && ( | |||
<div | |||
key={`${pl.id}-marker`} | |||
onClick={() => openPl(pl)} | |||
onClick={() => { | |||
console.log('I ran'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clean up needed
@@ -100,6 +110,8 @@ export default function MapComponent({ | |||
width: '100%', | |||
}} | |||
> | |||
{/* NOTE: this functionality does not seem to work locally using React 18. | |||
To test, a temporary fix is to set `reactStrictMode=false` in next.config.js */} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no on
props in DrawControl's DrawControlProps
@@ -105,65 +90,22 @@ export default function MapComponent({ | |||
}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need to disable eslint on line 86
@@ -1,21 +1,26 @@ | |||
import React, { ReactElement } from 'react'; | |||
import TransactionListLoader from '../../../../../public/assets/images/icons/TransactionListLoader'; | |||
import TransactionsNotFound from '../../../../../public/assets/images/icons/TransactionsNotFound'; | |||
import PlantLocation from './PlantLocation'; | |||
import styles from '../TreeMapper.module.scss'; | |||
import { useTranslation } from 'next-i18next'; | |||
import { | |||
SamplePlantLocation, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clean up needed
} | ||
longitude={ | ||
showDetails?.coordinates ? showDetails?.coordinates[1] : 0 | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cleanup needed for DetailsType
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Further improvements are possible, but let's look into that in the future.
fix -> types error for maps