@hoddy-ui/core 1.0.29 → 1.0.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -13,15 +13,18 @@ import { LocatorProps } from "../types";
|
|
|
13
13
|
import { getApiKey } from "../config/KeyManager";
|
|
14
14
|
import Typography from "./Typography";
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
if (GOOGLE_MAP_API_KEY) Location.setGoogleApiKey(GOOGLE_MAP_API_KEY);
|
|
16
|
+
setTimeout(() => {
|
|
17
|
+
const { GOOGLE_MAP_API_KEY } = getApiKey();
|
|
18
|
+
if (GOOGLE_MAP_API_KEY) Location.setGoogleApiKey(GOOGLE_MAP_API_KEY);
|
|
19
|
+
}, 500);
|
|
19
20
|
|
|
20
21
|
type predictionType = {
|
|
21
22
|
id: string;
|
|
22
23
|
description: string;
|
|
23
24
|
};
|
|
24
25
|
export const getPredictionsFromCoords = async (coords: any) => {
|
|
26
|
+
const { GOOGLE_MAP_API_KEY } = getApiKey();
|
|
27
|
+
|
|
25
28
|
if (!GOOGLE_MAP_API_KEY)
|
|
26
29
|
console.error(
|
|
27
30
|
"Google map api key needs to be set to use this component \nMake sure to run initialize() with a valid google map api key"
|
|
@@ -61,6 +64,8 @@ export const Locator: React.FC<LocatorProps> = ({
|
|
|
61
64
|
float = true,
|
|
62
65
|
country = "ng",
|
|
63
66
|
}) => {
|
|
67
|
+
const { GOOGLE_MAP_API_KEY } = getApiKey();
|
|
68
|
+
|
|
64
69
|
const [changed, setChanged] = useState(false);
|
|
65
70
|
const [value, setValue] = useState("");
|
|
66
71
|
const [prediction, setPrediction] = useState<predictionType[]>([]);
|