Skip to content

Commit 7a9190e

Browse files
Merge pull request #77 from Lambda-School-Labs/tigran-sargsyan
Created FlyTo button(function) which smoothly interpolates between locations
2 parents 98f960b + 52badc4 commit 7a9190e

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

src/Components/Filter/Filter.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,13 @@ export default function Filter() {
1919
function handleOffense(event) {
2020
setOffense(event.target.value )
2121

22+
2223
}
2324

2425
function handleStateAbbr(event) {
2526
setStateAbbr( event.target.value)
2627

28+
2729
}
2830
console.log(offense);
2931
console.log(stateAbbr);
@@ -39,6 +41,7 @@ useEffect(() => {
3941
let newData = currentData.map( nD => {
4042

4143
return(<PrettyDiv> <p>{nD.value + " Instances of "+offense +" occured in the year " + nD.data_year+ " within the state "+stateAbbr}</p></PrettyDiv>)
44+
4245
});
4346
setState(newData)
4447
console.log("filter res.data", newData)
@@ -81,7 +84,9 @@ useEffect(() => {
8184
<option>Select State</option>
8285

8386
<option value="AL">Alabama</option>
87+
8488
{/* <option value="AK">Alaska</option> */}
89+
8590
<option value="AZ">Arizona</option>
8691
<option value="AR">Arkansas</option>
8792
{/* <option value="CA">California</option> */}

src/Components/Map/OurMap.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class OurMap extends Component {
5050
this.handleClick = () => {
5151
map.flyTo({
5252
center: [
53-
-74.50 + (Math.random() - 0.5) * 10,
53+
-96 + (Math.random() - 0.5) * 10,
5454
40 + (Math.random() - 0.5) * 10],
5555
zoom: 9
5656
});

src/Components/Metadata/Population.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ console.log(pop, "Census Data")
3939
return (
4040
<Box className="pop-stats">
4141
<Inner>
42+
4243
<h1>Total Population of The United States in 2018</h1>
44+
4345
<p>{pop}</p>
4446

4547
</Inner>

0 commit comments

Comments
 (0)