File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed
Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff 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> */ }
Original file line number Diff line number Diff 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 } ) ;
Original file line number Diff line number Diff 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 >
You can’t perform that action at this time.
0 commit comments