Merge pull request #116 from ethereum/display-12-releases

fix: show 2 latest releases for linux
pull/26459/head^2
Paul Wackerow 2 years ago committed by GitHub
commit 04adbb749b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      src/components/UI/downloads/DownloadsTable.tsx
  2. 2
      src/constants.ts
  3. 4
      src/pages/downloads.tsx

@ -33,6 +33,8 @@ export const DownloadsTable: FC<Props> = ({
androidData.length androidData.length
]; ];
const LAST_2_LINUX_RELEASES = amountOfReleasesToShow + 12;
return ( return (
<Stack sx={{ mt: '0 !important' }} borderBottom='2px solid' borderColor='primary'> <Stack sx={{ mt: '0 !important' }} borderBottom='2px solid' borderColor='primary'>
<Tabs variant='unstyled' onChange={idx => setTotalReleases(totalReleases[idx])}> <Tabs variant='unstyled' onChange={idx => setTotalReleases(totalReleases[idx])}>
@ -61,7 +63,7 @@ export const DownloadsTable: FC<Props> = ({
<TabPanel p={0}> <TabPanel p={0}>
<DataTable <DataTable
columnHeaders={DOWNLOADS_TABLE_TAB_COLUMN_HEADERS} columnHeaders={DOWNLOADS_TABLE_TAB_COLUMN_HEADERS}
data={linuxData.slice(0, amountOfReleasesToShow)} data={linuxData.slice(0, LAST_2_LINUX_RELEASES)}
/> />
</TabPanel> </TabPanel>
<TabPanel p={0}> <TabPanel p={0}>

@ -20,7 +20,7 @@ export const GETH_DISCORD_URL = 'https://discord.com/invite/nthXNEv';
export const GO_URL = 'https://go.dev/'; export const GO_URL = 'https://go.dev/';
// Downloads // Downloads
export const DEFAULT_BUILD_AMOUNT_TO_SHOW = 10; export const DEFAULT_BUILD_AMOUNT_TO_SHOW = 12;
export const DOWNLOAD_HEADER_BUTTONS: { export const DOWNLOAD_HEADER_BUTTONS: {
[index: string]: { [index: string]: {
name: string; name: string;

@ -287,11 +287,11 @@ const DownloadsPage: NextPage<Props> = ({ data }) => {
const [totalDevBuilds, setTotalDevBuilds] = useState(ALL_LINUX_DEV_BUILDS.length); const [totalDevBuilds, setTotalDevBuilds] = useState(ALL_LINUX_DEV_BUILDS.length);
const showMoreStableReleases = () => { const showMoreStableReleases = () => {
setAmountStableReleases(amountStableReleases + 10); setAmountStableReleases(amountStableReleases + 12);
}; };
const showMoreDevBuilds = () => { const showMoreDevBuilds = () => {
setAmountDevBuilds(amountDevBuilds + 10); setAmountDevBuilds(amountDevBuilds + 12);
}; };
return ( return (

Loading…
Cancel
Save