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

fix: Fix IconMarker compilation errors #241

Merged
merged 3 commits into from
Dec 19, 2024
Merged

Conversation

anton-bcgov
Copy link
Contributor

@anton-bcgov anton-bcgov commented Dec 18, 2024

Description

This fixes a compilation error that popped up for @midhun-aot after updating dependencies locally and could have appeared for others in the future

The error is:

ERROR in src/app/features/map/IconMarker.tsx:24:3
TS2345: Argument of type '({ position, icon, onClick, onHover, eventHandlers, children, riseOnHover, ...rest }: Props, ref: ForwardedRef<Marker<any>>) => Element' is not assignable to parameter of type 'ForwardRefRenderFunction<Marker<any>, Omit<Props, "ref">>'.
  Types of parameters '__0' and 'props' are incompatible.
    Type 'Omit<Props, "ref">' is missing the following properties from type 'Props': position, onHover

The fix is that we now destructure the props in the function body instead of the parameter list, which apparently you shouldn't do when wrapping a component in a forwardRef


Thanks for the PR!

Deployments, as required, will be available below:

Please create PRs in draft mode. Mark as ready to enable:

After merge, new images are deployed in:

@anton-bcgov anton-bcgov requested a review from a team as a code owner December 18, 2024 23:21
@anton-bcgov anton-bcgov changed the title Fix IconMarker compilation errors fix: Fix IconMarker compilation errors Dec 18, 2024
@midhun-aot midhun-aot merged commit 9aa4139 into dev Dec 19, 2024
15 checks passed
@midhun-aot midhun-aot deleted the anton/fix-forwardRef branch December 19, 2024 06:37
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