small prop refactor

pull/26459/head^2
Corwin Smith 2 years ago
parent ac622c103d
commit a1b31a316b
  1. 19
      src/components/UI/downloads/DownloadsTable.tsx
  2. 8
      src/pages/downloads.tsx

@ -7,12 +7,17 @@ import {
TabPanel, TabPanel,
TabPanels, TabPanels,
} from '@chakra-ui/react'; } from '@chakra-ui/react';
import { FC } from 'react';
import { DataTable } from '../DataTable' import { DataTable } from '../DataTable'
import { testDownloadData } from '../../../data/test/download-testdata' interface Props {
data: any
}
export const DownloadsTable = () => { export const DownloadsTable: FC<Props> = ({
data
}) => {
return ( return (
<Stack sx={{ mt: '0 !important' }} borderBottom='2px solid #11866f'> <Stack sx={{ mt: '0 !important' }} borderBottom='2px solid #11866f'>
<Tabs variant='unstyled'> <Tabs variant='unstyled'>
@ -132,7 +137,7 @@ export const DownloadsTable = () => {
'Size', 'Size',
'Published' 'Published'
]} ]}
data={testDownloadData} data={data}
/> />
</TabPanel> </TabPanel>
<TabPanel p={0}> <TabPanel p={0}>
@ -145,7 +150,7 @@ export const DownloadsTable = () => {
'Size', 'Size',
'Published' 'Published'
]} ]}
data={testDownloadData} data={data}
/> />
</TabPanel> </TabPanel>
<TabPanel p={0}> <TabPanel p={0}>
@ -158,7 +163,7 @@ export const DownloadsTable = () => {
'Size', 'Size',
'Published' 'Published'
]} ]}
data={testDownloadData} data={data}
/> />
</TabPanel> </TabPanel>
<TabPanel p={0}> <TabPanel p={0}>
@ -171,7 +176,7 @@ export const DownloadsTable = () => {
'Size', 'Size',
'Published' 'Published'
]} ]}
data={testDownloadData} data={data}
/> />
</TabPanel> </TabPanel>
<TabPanel p={0}> <TabPanel p={0}>
@ -184,7 +189,7 @@ export const DownloadsTable = () => {
'Size', 'Size',
'Published' 'Published'
]} ]}
data={testDownloadData} data={data}
/> />
</TabPanel> </TabPanel>
</TabPanels> </TabPanels>

@ -20,6 +20,8 @@ import {
GETH_REPO_URL GETH_REPO_URL
} from '../constants' } from '../constants'
import { testDownloadData } from '../data/test/download-testdata'
const DownloadsPage: NextPage = ({}) => { const DownloadsPage: NextPage = ({}) => {
return ( return (
@ -109,7 +111,8 @@ const DownloadsPage: NextPage = ({}) => {
</Text> </Text>
</Stack> </Stack>
<DownloadsTable /> {/* TODO: swap test data for real data */}
<DownloadsTable data={testDownloadData}/>
<Stack sx={{ mt: '0 !important' }}> <Stack sx={{ mt: '0 !important' }}>
<Button <Button
@ -160,7 +163,8 @@ const DownloadsPage: NextPage = ({}) => {
</Text> </Text>
</Stack> </Stack>
<DownloadsTable /> {/* TODO: swap for real data */}
<DownloadsTable data={testDownloadData} />
<Stack sx={{ mt: '0 !important' }}> <Stack sx={{ mt: '0 !important' }}>
<Button <Button

Loading…
Cancel
Save