forked from visgl/react-google-maps
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(examples) use globalThis instead of passing props
- Loading branch information
1 parent
c98a8b3
commit 04088f4
Showing
4 changed files
with
14 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export declare global { | ||
// const or let does not work in this case, it has to be var | ||
// eslint-disable-next-line no-var | ||
var GOOGLE_MAPS_API_KEY: string | undefined; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
// For the codesandbox examples, the 'process.env.GOOGLE_MAPS_API_KEY' | ||
// gets replaced in the deploy task in the github action | ||
// to contain the valid key for the examples | ||
export default { | ||
GOOGLE_MAPS_API_KEY: process.env.GOOGLE_MAPS_API_KEY | ||
}; | ||
globalThis.GOOGLE_MAPS_API_KEY = process.env.GOOGLE_MAPS_API_KEY; |