change requests

pull/26459/head^2
Corwin Smith 2 years ago
parent 649d22ba37
commit 522996db84
  1. 4
      src/components/UI/downloads/DownloadsHero.tsx
  2. 2
      src/components/UI/downloads/DownloadsTable.tsx
  3. 18
      src/pages/downloads.tsx
  4. 2
      src/theme/components/Link.ts

@ -56,10 +56,10 @@ export const DownloadsHero: FC<DownloadsHero> = ({
</Text> </Text>
{ {
Object.keys(DOWNLOAD_HEADER_BUTTONS).map((key: string, idx) => { Object.keys(DOWNLOAD_HEADER_BUTTONS).map((key: string) => {
return ( return (
<NextLink <NextLink
key={idx} key={key}
href={DOWNLOAD_HEADER_BUTTONS[key].buildURL} href={DOWNLOAD_HEADER_BUTTONS[key].buildURL}
passHref passHref
> >

@ -38,7 +38,7 @@ export const DownloadsTable: FC<Props> = ({
DOWNLOAD_TABS.map((tab, idx) => { DOWNLOAD_TABS.map((tab, idx) => {
return ( return (
<Tab <Tab
key={idx} key={tab}
w={'20%'} w={'20%'}
p={4} p={4}
_selected={{ _selected={{

@ -27,10 +27,18 @@ import { testDownloadData } from '../data/test/download-testdata'
import { pgpBuildTestData } from '../data/test/pgpbuild-testdata'; import { pgpBuildTestData } from '../data/test/pgpbuild-testdata';
import { pgpDeveloperTestData } from '../data/test/pgpdeveloper-testdata'; import { pgpDeveloperTestData } from '../data/test/pgpdeveloper-testdata';
const DownloadsPage: NextPage = ({}) => { const DownloadsPage: NextPage = () => {
const [amountStableReleases, updateAmountStables] = useState(DEFAULT_BUILD_AMOUNT_TO_SHOW) const [amountStableReleases, updateAmountStables] = useState(DEFAULT_BUILD_AMOUNT_TO_SHOW)
const [amountDevelopBuilds, updateAmountDevelopBuilds] = useState(DEFAULT_BUILD_AMOUNT_TO_SHOW) const [amountDevelopBuilds, updateAmountDevelopBuilds] = useState(DEFAULT_BUILD_AMOUNT_TO_SHOW)
const showMoreStableReleases = () => {
updateAmountStables(amountStableReleases+10)
}
const showMoreDevelopBuilds = () => {
updateAmountDevelopBuilds(amountDevelopBuilds+10)
}
return ( return (
<> <>
{/* TODO: add PageMetadata */} {/* TODO: add PageMetadata */}
@ -108,9 +116,7 @@ const DownloadsPage: NextPage = ({}) => {
<DownloadsTable data={testDownloadData.slice(0, amountStableReleases)}/> <DownloadsTable data={testDownloadData.slice(0, amountStableReleases)}/>
<Stack sx={{ mt: '0 !important' }}> <Stack sx={{ mt: '0 !important' }}>
<Link as='button' variant='button-link-secondary' onClick={() => { <Link as='button' variant='button-link-secondary' onClick={showMoreStableReleases}>
updateAmountStables(amountStableReleases+10)
}}>
<Text <Text
fontFamily='"JetBrains Mono", monospace' fontFamily='"JetBrains Mono", monospace'
fontWeight={700} fontWeight={700}
@ -142,9 +148,7 @@ const DownloadsPage: NextPage = ({}) => {
<DownloadsTable data={testDownloadData.slice(0, amountDevelopBuilds)} /> <DownloadsTable data={testDownloadData.slice(0, amountDevelopBuilds)} />
<Stack sx={{ mt: '0 !important' }}> <Stack sx={{ mt: '0 !important' }}>
<Link as='button' variant='button-link-secondary' onClick={() => { <Link as='button' variant='button-link-secondary' onClick={showMoreDevelopBuilds}>
updateAmountDevelopBuilds(amountDevelopBuilds+10)
}}>
<Text <Text
fontFamily='"JetBrains Mono", monospace' fontFamily='"JetBrains Mono", monospace'
fontWeight={700} fontWeight={700}

@ -25,6 +25,6 @@ export const Link = {
color: 'brand.light.secondary', color: 'brand.light.secondary',
textDecorationColor: 'brand.light.secondary' textDecorationColor: 'brand.light.secondary'
} }
}, }
} }
}; };

Loading…
Cancel
Save