Skip to content

Commit

Permalink
Merge pull request #4 from Bardolog1/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
Bardolog1 authored Aug 6, 2023
2 parents 9f5a60f + c1509e9 commit 6dbd597
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ yarn-error.log*
*.sln

#Api
src/config.js
src/config.js
.env
5 changes: 3 additions & 2 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import styled from 'styled-components';
import LeftViewer from './components/LeftViewer';
import RightViewer from './components/RightViewer';
import { useFetch } from "./hooks/useFetch";
import apiKey from './config';



const AppCont = styled.div`
Expand All @@ -23,7 +23,8 @@ const AppCont = styled.div`
const App = () => {


// apiKey incluida desde un fichero externo indexado en el .gitignore
// apiKey incluida desde un fichero externo de variables de entorno indexado en el .gitignore
const apiKey = process.env.REACT_APP_API_KEY;
const [lati, setLati] = useState('4.6097');
const [longi, setLongi] = useState('-74.0817');
const weatherUrl = `https://api.openweathermap.org/data/2.5/weather?lat=${lati}&lon=${longi}&appid=${apiKey}`;
Expand Down

0 comments on commit 6dbd597

Please sign in to comment.