diff --git a/src/pages/supporters.tsx b/src/pages/supporters.tsx index 081cfaa8..7421835a 100644 --- a/src/pages/supporters.tsx +++ b/src/pages/supporters.tsx @@ -7,6 +7,8 @@ import Button from "../components/Button"; import SupportersList from "../components/SupportersList"; import Headline from "../components/Headline"; +const INITIAL_LIST_COUNT = 20; + export default function SupportersPage() { const groupedSupporters = groupSupportersByType(supporters); const types = Object.entries(groupedSupporters); @@ -17,9 +19,9 @@ export default function SupportersPage() { const truncatedSupporters = showAll ? filteredSupporters - : filteredSupporters.slice(0, 20); + : filteredSupporters.slice(0, INITIAL_LIST_COUNT); - const hasMore = filteredSupporters.length > truncatedSupporters.length; + const hasMoreButtonVisible = filteredSupporters.length > INITIAL_LIST_COUNT; return ( @@ -53,18 +55,20 @@ export default function SupportersPage() {
- + {hasMoreButtonVisible && ( + + )}