fix theme issue, and move default amount of builds to show to a constant

pull/26459/head^2
Corwin Smith 2 years ago
parent b6fc69ab5c
commit 524d187a40
  1. 3
      src/constants.ts
  2. 9
      src/pages/downloads.tsx

@ -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;

@ -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 = ({}) => {
<DownloadsTable data={testDownloadData.slice(0, amountStableReleases)}/>
<Stack sx={{ mt: '0 !important' }}>
<Link as='button' variant='secondary' onClick={() => {
<Link as='button' variant='button-link-secondary' onClick={() => {
updateAmountStables(amountStableReleases+10)
}}>
<Text
@ -140,7 +141,7 @@ const DownloadsPage: NextPage = ({}) => {
<DownloadsTable data={testDownloadData.slice(0, amountDevelopBuilds)} />
<Stack sx={{ mt: '0 !important' }}>
<Link as='button' variant='secondary' onClick={() => {
<Link as='button' variant='button-link-secondary' onClick={() => {
updateAmountDevelopBuilds(amountDevelopBuilds+10)
}}>
<Text

Loading…
Cancel
Save