simplified code

This commit is contained in:
Annika Hannig 2022-07-25 18:20:39 +02:00
parent 04681d5bbb
commit acc37d53d8

View File

@ -4,8 +4,8 @@ import { useRef
}
from 'react';
import { useQuery }
from 'app/context/query';
import { useSearchQuery }
from 'app/context/search';
import { useNeighbors }
from 'app/context/neighbors';
@ -66,12 +66,11 @@ const filterNeighbors = (protocols, filter) => {
const Neighbors = () => {
const [ query ] = useQuery();
const filter = query.q;
const refUp = useRef();
const refDown = useRef();
const filter = useSearchQuery();
const {isLoading, neighbors} = useNeighbors();
const filtered = useMemo(
@ -107,7 +106,7 @@ const Neighbors = () => {
})
if (isLoading) {
return <LoadingIndicator show={true} />;
return <LoadingIndicator />;
}
if (!filtered || filtered.length === 0) {