fix: show 2 latest releases for linux
This commit is contained in:
parent
969ad78eb3
commit
50bfc2053a
|
@ -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…
Reference in New Issue