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

Type Error in LoadScript.tsx #3403

Open
pimjunhavittaya opened this issue Jan 27, 2025 · 4 comments
Open

Type Error in LoadScript.tsx #3403

pimjunhavittaya opened this issue Jan 27, 2025 · 4 comments

Comments

@pimjunhavittaya
Copy link

Hi Team,

When I run build I got this error:
Image

This is how I call useLoadScript in my code

export const GOOGLE_MAP_CONFIGS: UseLoadScriptOptions = {
  id: 'map',
  googleMapsApiKey: env.nextPublicGoogleMapsApiKey ?? '',
  libraries: ['marker', 'places'],
};

const { isLoaded } = useJsApiLoader(GOOGLE_MAP_CONFIGS);

My Packages:
React: 19.0.0
react-dom: 19.0.0
typescript: 5.7.3
@react-google-maps/api: 2.20.5
next: 15.1.5

@JustFly1984
Copy link
Owner

Please provide a PR and I will merge

@pimjunhavittaya
Copy link
Author

@JustFly1984 ,

I cannot create a PR due to permission error:

Image

Can you please help to update the following files?:
packages/react-google-maps-api/src/LoadScript.tsx
packages/react-google-maps-api/src/useLoadScript.tsx

I attached them in the zip file:
Archive.zip

I have tested with both React 18 and React 19.

@JustFly1984
Copy link
Owner

JustFly1984 commented Feb 5, 2025

@pimjunhavittaya that is not how PR works. You should fork the repo, make changes in your own repo, and make a PR from your repo into mine, and I will accept it and release new version.

PS: please use branch upgrade as target for the repo.

@pimjunhavittaya
Copy link
Author

@JustFly1984 ,
I have created PR.

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

No branches or pull requests

2 participants