small prop refactor

This commit is contained in:
Corwin Smith 2022-10-07 18:48:57 -06:00
parent ac622c103d
commit a1b31a316b
2 changed files with 18 additions and 9 deletions

View File

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

View File

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