diff options
author | Ezekiel Aquino <ezekiel@bakkenbaeck.no> | 2018-11-29 16:33:06 +0800 |
---|---|---|
committer | Ezekiel Aquino <ezekiel@bakkenbaeck.no> | 2018-11-29 16:33:06 +0800 |
commit | 03289293c3331735287346d9e1582474c2ee2f49 (patch) | |
tree | 1c736260042d2298c40388bf81fa843eb0cb5a41 /packages/website/ts/@next/components/footer.tsx | |
parent | 0736ba7159f54d45ded79b55a976c96cbc3865e3 (diff) | |
download | dexon-0x-contracts-03289293c3331735287346d9e1582474c2ee2f49.tar dexon-0x-contracts-03289293c3331735287346d9e1582474c2ee2f49.tar.gz dexon-0x-contracts-03289293c3331735287346d9e1582474c2ee2f49.tar.bz2 dexon-0x-contracts-03289293c3331735287346d9e1582474c2ee2f49.tar.lz dexon-0x-contracts-03289293c3331735287346d9e1582474c2ee2f49.tar.xz dexon-0x-contracts-03289293c3331735287346d9e1582474c2ee2f49.tar.zst dexon-0x-contracts-03289293c3331735287346d9e1582474c2ee2f49.zip |
Fixes interface syntax
Diffstat (limited to 'packages/website/ts/@next/components/footer.tsx')
-rw-r--r-- | packages/website/ts/@next/components/footer.tsx | 40 |
1 files changed, 28 insertions, 12 deletions
diff --git a/packages/website/ts/@next/components/footer.tsx b/packages/website/ts/@next/components/footer.tsx index aff5c13c4..be5c075f9 100644 --- a/packages/website/ts/@next/components/footer.tsx +++ b/packages/website/ts/@next/components/footer.tsx @@ -8,16 +8,27 @@ import { Button } from './button'; import { Section, Wrap, Column } from './layout'; import { Logo } from './logo'; -export interface FooterInterface { +interface FooterInterface { } -export interface LinkInterface { +interface LinkInterface { text: string; url: string; newWindow?: boolean; } -const linkRows = [ +interface LinkRows { + [key: string]: { + heading: string; + links: Array<LinkInterface>; + } +} + +interface LinkListProps { + links: Array<LinkInterface>; +} + +const linkRows: LinkRows = [ { heading: 'Products', links: [ @@ -65,15 +76,7 @@ export const Footer: React.StatelessComponent<FooterInterface> = ({}) => ( { row.heading } </RowHeading> - <ul> - {_.map(row.links, (link, index) => ( - <li key={`fl-${index}`}> - <Link href={link.url}> - { link.text } - </Link> - </li> - ))} - </ul> + <LinkList links={row.links} /> </Column> ))} </Wrap> @@ -82,6 +85,19 @@ export const Footer: React.StatelessComponent<FooterInterface> = ({}) => ( </FooterWrap> ); + +const LinkList = (props: LinkListProps) => ( + <ul> + {_.map(props.links, (link, index) => ( + <li key={`fl-${index}`}> + <Link href={link.url}> + { link.text } + </Link> + </li> + ))} + </ul> +); + const FooterWrap = Section.withComponent('footer'); const RowHeading = styled.h3` |