-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Installed dotenv, added mapbox access token and minor map styles - Ma…
…pbox now working
- Loading branch information
Eloise Barrow
authored and
Eloise Barrow
committed
Aug 26, 2019
1 parent
e0face8
commit 4abd7ce
Showing
8 changed files
with
45 additions
and
45 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
SKIP_PREFLIGHT_CHECK=true | ||
|
||
REACT_APP_MAPBOX_ACCESS_TOKEN='pk.eyJ1IjoiZWxvaXNlYmFycm93IiwiYSI6ImNqenNpZGwyYzFtamIzY281ZThoZWNrMGEifQ.SWnRqoz8mwfwUpg0ci3Xkw' |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,37 +1,17 @@ | ||
import React from 'react'; | ||
import './App.css'; | ||
import axios from 'axios' | ||
import Footer from './components/Footer' | ||
import Header from './components/Header' | ||
import Main from './components/Main' | ||
|
||
class App extends React.Component { | ||
state = { | ||
data: [], | ||
} | ||
|
||
makeApiCall = async () => { | ||
const response = await axios.get('https://data.cityofnewyork.us/resource/sxx4-xhzg.json') | ||
const data = response.data; | ||
|
||
this.setState({ | ||
data | ||
}) | ||
} | ||
|
||
componentDidMount() { | ||
this.makeApiCall(); | ||
} | ||
|
||
render() { | ||
return ( | ||
<div className="App"> | ||
<Header /> | ||
<Main apiData={this.state.data} /> | ||
<Footer /> | ||
</div> | ||
); | ||
} | ||
function App() { | ||
return ( | ||
<div className="App"> | ||
<Header /> | ||
<Main /> | ||
<Footer /> | ||
</div> | ||
); | ||
} | ||
|
||
export default App; |
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