Skip to content

Commit

Permalink
Merge pull request #854 from culturecreates/bugfix/issue-781
Browse files Browse the repository at this point in the history
Bugfix/issue 781
  • Loading branch information
AbhishekPAnil authored Dec 8, 2023
2 parents 1e22f37 + 3edfe48 commit 2e58f4e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
12 changes: 11 additions & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,17 @@
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>Footlight Calendar</title>
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyA34hPcJ7CKANXj1ZPcEMX5d89563wexsw&libraries=places"></script>
<script>
window.myCallbackFunc = function () {
window.initOne && window.initOne();
window.initTwo && window.initTwo();
};
</script>
<script
async
defer
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyA34hPcJ7CKANXj1ZPcEMX5d89563wexsw&libraries=places&callback=myCallbackFunc"
></script>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
7 changes: 6 additions & 1 deletion src/components/Modal/QuickCreatePlace/QuickCreatePlace.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,12 @@ function QuickCreatePlace(props) {
]}
required
data-cy="form-item-quick-create-place-address-label">
<PlacesAutocomplete value={address} onChange={handleChange} onSelect={handleSelect}>
<PlacesAutocomplete
searchOptions={{ componentRestrictions: { country: 'CA' } }}
value={address}
onChange={handleChange}
onSelect={handleSelect}
googleCallbackName="initOne">
{({ getInputProps, suggestions, getSuggestionItemProps }) => (
<Dropdown
open={dropdownOpen}
Expand Down
2 changes: 2 additions & 0 deletions src/pages/Dashboard/CreateNewPlace/CreateNewPlace.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -1299,6 +1299,8 @@ function CreateNewPlace() {
</Row>
<Form.Item name="addressSearch">
<PlacesAutocomplete
googleCallbackName="initTwo"
searchOptions={{ componentRestrictions: { country: 'CA' } }}
value={address}
onChange={handleChange}
onSelect={handleSelect}
Expand Down

0 comments on commit 2e58f4e

Please sign in to comment.