Skip to content

Commit

Permalink
Handle lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
reneepinna committed Oct 22, 2023
1 parent 3d762bd commit d71b8c4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
8 changes: 3 additions & 5 deletions src/Components/SearchResults/SearchResults.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,11 @@ export default function SearchResults({
searchFilter,
}) {
const [searchResults, setSearchResults] = useState([]);
const [noResults, setNoResults] = useState(true);

useEffect(() => {
const noResults = data?.aidRequests.length ? false : true;
setNoResults(noResults);

let results = data ? data.aidRequests.filter(request => request.status === 'active') : [];
let results = data
? data.aidRequests.filter(request => request.status === 'active')
: [];

if (searchFilter) {
results = results.filter(
Expand Down
10 changes: 5 additions & 5 deletions src/Map/MapController.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import {useEffect} from 'react'
import { useMap } from 'react-leaflet'
import { useEffect } from 'react';
import { useMap } from 'react-leaflet';

export default function MapController({latLon}) {
export default function MapController({ latLon }) {
const map = useMap();

useEffect(() => {
map.flyTo(latLon, 15, {duration: 1.5})
}, [latLon])
map.flyTo(latLon, 15, { duration: 1.5 });
}, [latLon, map]);

return null;
}

0 comments on commit d71b8c4

Please sign in to comment.