diff --git a/src/constants.ts b/src/constants.ts index 92abc34178..6a67470b99 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -9,3 +9,6 @@ export const ETHEREUM_ORG_URL = 'https://ethereum.org'; export const ETHEREUM_ORG_RUN_A_NODE_URL = 'https://ethereum.org/en/run-a-node/'; export const ETHEREUM_FOUNDATION_URL = 'https://ethereum.foundation'; export const GETH_REPO_URL = 'https://github.com/ethereum/go-ethereum'; + +// Downloads +export const DEFAULT_BUILD_AMOUNT_TO_SHOW = 10; diff --git a/src/pages/downloads.tsx b/src/pages/downloads.tsx index 3ab4de404b..3e24ac53f5 100644 --- a/src/pages/downloads.tsx +++ b/src/pages/downloads.tsx @@ -17,6 +17,7 @@ import { import { DataTable } from '../components/UI/DataTable'; import { + DEFAULT_BUILD_AMOUNT_TO_SHOW, GETH_REPO_URL } from '../constants' @@ -25,8 +26,8 @@ import { pgpBuildTestData } from '../data/test/pgpbuild-testdata'; import { pgpDeveloperTestData } from '../data/test/pgpdeveloper-testdata'; const DownloadsPage: NextPage = ({}) => { - const [amountStableReleases, updateAmountStables] = useState(10) - const [amountDevelopBuilds, updateAmountDevelopBuilds] = useState(10) + const [amountStableReleases, updateAmountStables] = useState(DEFAULT_BUILD_AMOUNT_TO_SHOW) + const [amountDevelopBuilds, updateAmountDevelopBuilds] = useState(DEFAULT_BUILD_AMOUNT_TO_SHOW) return ( <> @@ -105,7 +106,7 @@ const DownloadsPage: NextPage = ({}) => { - { + { updateAmountStables(amountStableReleases+10) }}> { - { + { updateAmountDevelopBuilds(amountDevelopBuilds+10) }}>