From 9017e57ac8e24166d83c4aa9b379b98718eaef53 Mon Sep 17 00:00:00 2001 From: Corwin Smith Date: Mon, 7 Nov 2022 11:12:10 -0700 Subject: [PATCH] downloadstable section --- .../UI/downloads/DownloadsSection.tsx | 45 ++++----- .../UI/downloads/SpecificVersionsSection.tsx | 12 +-- src/components/UI/downloads/index.ts | 2 +- src/pages/downloads.tsx | 97 +++++++++++++------ 4 files changed, 98 insertions(+), 58 deletions(-) diff --git a/src/components/UI/downloads/DownloadsSection.tsx b/src/components/UI/downloads/DownloadsSection.tsx index 41b9ea9487..7a948f7705 100644 --- a/src/components/UI/downloads/DownloadsSection.tsx +++ b/src/components/UI/downloads/DownloadsSection.tsx @@ -10,7 +10,14 @@ interface Props { sectionTitle: string; } -export const DownloadsSection: FC = ({ children, imgSrc, imgAltText, sectionDescription, sectionTitle, id }) => { +export const DownloadsSection: FC = ({ + children, + imgSrc, + imgAltText, + sectionDescription, + sectionTitle, + id +}) => { return ( {!!imgSrc && ( @@ -23,36 +30,30 @@ export const DownloadsSection: FC = ({ children, imgSrc, imgAltText, sect - +
{sectionTitle}
- - { - sectionDescription && ( - -
- {sectionDescription} -
-
- ) - } + + {sectionDescription && ( + +
{sectionDescription}
+
+ )}
- {children} + + {children} +
); }; diff --git a/src/components/UI/downloads/SpecificVersionsSection.tsx b/src/components/UI/downloads/SpecificVersionsSection.tsx index 29fa2ecf16..d7f9279771 100644 --- a/src/components/UI/downloads/SpecificVersionsSection.tsx +++ b/src/components/UI/downloads/SpecificVersionsSection.tsx @@ -8,25 +8,23 @@ interface Props { export const SpecificVersionsSection: FC = ({ children }) => { return ( {/* TODO: use NextImage */} Gopher facing right - + = ({ children }) => { ); -}; \ No newline at end of file +}; diff --git a/src/components/UI/downloads/index.ts b/src/components/UI/downloads/index.ts index 8b41b706fc..9c5b9ae8c4 100644 --- a/src/components/UI/downloads/index.ts +++ b/src/components/UI/downloads/index.ts @@ -1,4 +1,4 @@ export * from './DownloadsHero'; export * from './DownloadsSection'; export * from './DownloadsTable'; -export * from './SpecificVersionsSection' +export * from './SpecificVersionsSection'; diff --git a/src/pages/downloads.tsx b/src/pages/downloads.tsx index 8fb07754e0..e01c4d832a 100644 --- a/src/pages/downloads.tsx +++ b/src/pages/downloads.tsx @@ -1,8 +1,13 @@ -import { Code, Link, ListItem, Stack, Text, UnorderedList } from '@chakra-ui/react'; +import { Center, Code, Flex, Link, ListItem, Stack, Text, UnorderedList } from '@chakra-ui/react'; import type { NextPage } from 'next'; import { useState } from 'react'; -import { DownloadsHero, DownloadsSection, DownloadsTable, SpecificVersionsSection } from '../components/UI/downloads'; +import { + DownloadsHero, + DownloadsSection, + DownloadsTable, + SpecificVersionsSection +} from '../components/UI/downloads'; import { DataTable } from '../components/UI'; import { @@ -105,19 +110,37 @@ const DownloadsPage: NextPage = () => { {/* TODO: swap test data for real data */} - - - - Show older releases - - - + + +
+ {/* TODO: swap testDownloadData with actual data */} + + Showing {amountStableReleases} latest releases of a total{' '} + {testDownloadData.length} releases + +
+
+ + + + Show older releases + + + +
{ {/* TODO: swap for real data */} - - - - Show older releases - - - + + +
+ {/* TODO: swap testDownloadData with actual data */} + + Showing {amountDevelopBuilds} latest releases of a total{' '} + {testDownloadData.length} releases + +
+
+ + + + Show older releases + + + +