Skip to content
Snippets Groups Projects
Commit fb2ec539 authored by Anael Lacour's avatar Anael Lacour
Browse files

add env

parent 1fb42ba2
No related branches found
No related tags found
No related merge requests found
module.exports = function(api) {
module.exports = function (api) {
api.cache(true);
return {
presets: ['babel-preset-expo'],
return { presets: ['babel-preset-expo'],
plugins: [['module:react-native-dotenv', {
'moduleName': '@env',
'path': '.env',
'blacklist': null,
'whitelist': null,
'safe': false,
'allowUndefined': true
}]]
};
};
......@@ -26,6 +26,7 @@
"react-google-maps": "^9.4.5",
"react-google-maps-loader": "^4.3.0",
"react-native": "0.68.1",
"react-native-dotenv": "^3.3.1",
"react-native-elements": "^3.4.2",
"react-native-normalize": "^1.0.1",
"react-native-paper": "^4.12.0",
......
import { TouchableOpacity } from 'react-native';
const MY_API_KEY = "AIzaSyB6HzGgBMx02aU48usTEQU6eijbvT8Sswo"
import {API_KEY} from '@env'
const MY_API_KEY = API_KEY
console.log(MY_API_KEY)
import React, { Component, useEffect, useRef, useState } from 'react';
import PropTypes from 'prop-types';
import isEmpty from 'lodash.isempty';
import jsonFile from '../../../public/places.json';
import GoogleMap from '../../components/googleMap';
import useComponentVisible from '../../components/ComponentVisible'
......@@ -39,7 +39,6 @@ const InfoWindow = (props) => {
<div ref={ref}>
{isComponentVisible &&(
<TouchableOpacity>
<div style={infoWindowStyle}>
<div style={{ fontSize: 16 }}>
......@@ -102,19 +101,7 @@ class MarkerInfoWindow extends Component {
places: [],
};
}
componentDidMount() {
// const getPlaces = async () => {
// const response = await fetch("./places.json");
// if (!response.ok) {
// throw new Error(`HTTP error ${response.status}`);
// }
// return await response.json();
// };
// const placesJson=getPlaces()
// console.log(placesJson)
jsonFile.results.forEach((result) => {
result.show = false; // eslint-disable-line no-param-reassign
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment