diff --git a/src/components/People/PeopleFilters.tsx b/src/components/People/PeopleFilters.tsx index 508bc5dea..475483bcd 100644 --- a/src/components/People/PeopleFilters.tsx +++ b/src/components/People/PeopleFilters.tsx @@ -8,6 +8,7 @@ export const PeopleFilters = () => { const allCenturies = searchParams.getAll('centuries'); const sex = searchParams.get('sex'); + const possibleCenturies = ['16', '17', '18', '19', '20']; const setSexFilterActiveClass = (selectedSex: string) => { return classNames( @@ -93,45 +94,15 @@ export const PeopleFilters = () => {
- - 16 - - - - 17 - - - - 18 - - - - 19 - - - - 20 - + {possibleCenturies.map(century => ( + + {century} + + ))}
diff --git a/src/components/People/PeoplePage.tsx b/src/components/People/PeoplePage.tsx index 0288e967b..c5eb969db 100644 --- a/src/components/People/PeoplePage.tsx +++ b/src/components/People/PeoplePage.tsx @@ -11,7 +11,7 @@ export const PeoplePage = () => { const [people, setPeople] = useState(null); const [isError, setIsError] = useState(false); - const showLoader = people === null && !isError; + const showLoader = !people && !isError; const peopleLoaded = people && people.length > 0; useEffect(() => { @@ -42,7 +42,7 @@ export const PeoplePage = () => {

Something went wrong

)} - {people && people.length === 0 && ( + {people && !people.length && (

There are no people on the server