From ceddc019853632f54dd803f5673e8688d38246ee Mon Sep 17 00:00:00 2001 From: Fred Carlsen Date: Fri, 14 Dec 2018 20:20:27 +0100 Subject: Type fixes --- packages/website/ts/@next/pages/about/jobs.tsx | 43 ++++++++++++++----------- packages/website/ts/@next/pages/about/press.tsx | 33 +++++++++++-------- packages/website/ts/@next/pages/about/team.tsx | 4 +-- packages/website/ts/@next/pages/instant.tsx | 4 +-- 4 files changed, 48 insertions(+), 36 deletions(-) (limited to 'packages/website/ts/@next/pages') diff --git a/packages/website/ts/@next/pages/about/jobs.tsx b/packages/website/ts/@next/pages/about/jobs.tsx index 5bcb0b855..d707c8d39 100644 --- a/packages/website/ts/@next/pages/about/jobs.tsx +++ b/packages/website/ts/@next/pages/about/jobs.tsx @@ -7,13 +7,17 @@ import { Link } from 'ts/@next/components/link'; import { Column, FlexWrap, Section } from 'ts/@next/components/newLayout'; import { Heading, Paragraph } from 'ts/@next/components/text'; -interface PositionInterface { +interface PositionProps { title: string; location: string; href: string; } -const positions: PositionInterface[] = [ +interface PositionItemProps { + position: PositionProps; +} + +const positions: PositionProps[] = [ { title: 'Product Designer', location: 'San Francisco, Remote', @@ -62,7 +66,7 @@ export const NextAboutJobs = () => (
- + Benefits @@ -97,21 +101,24 @@ export const NextAboutJobs = () => ( ); -const Position = ({ position }) => ( - - - {position.title} - - - - {position.location} - - - - Apply - - -); +export const Position: React.FunctionComponent = (props: PositionItemProps) => { + const { position } = props; + return ( + + + {position.title} + + + + {position.location} + + + + Apply + + + ); +}; const BenefitsList = styled.ul` color: #000; diff --git a/packages/website/ts/@next/pages/about/press.tsx b/packages/website/ts/@next/pages/about/press.tsx index 8cb6080a9..4ef043e80 100644 --- a/packages/website/ts/@next/pages/about/press.tsx +++ b/packages/website/ts/@next/pages/about/press.tsx @@ -7,14 +7,18 @@ import { Button } from 'ts/@next/components/button'; import { Column, FlexWrap } from 'ts/@next/components/newLayout'; import { Paragraph } from 'ts/@next/components/text'; -interface HighlightInterface { +interface HighlightProps { logo: string; title?: string; text: string; href: string; } -const highlights: HighlightInterface[] = [ +interface HighlightItemProps { + highlight: HighlightProps; +} + +const highlights: HighlightProps[] = [ { logo: '/images/@next/press/logo-forbes.png', title: 'Forbes', @@ -58,18 +62,21 @@ export const NextAboutPress = () => ( /> ); -const Highlight = ({ highlight }) => ( - - - {highlight.title} - +export const Highlight: React.FunctionComponent = (props: HighlightItemProps) => { + const { highlight } = props; + return ( + + + {highlight.title} + - - {highlight.text} - - - -); + + {highlight.text} + + + + ); +}; const HighlightWrap = styled(FlexWrap)` border-top: 1px solid #eaeaea; diff --git a/packages/website/ts/@next/pages/about/team.tsx b/packages/website/ts/@next/pages/about/team.tsx index 5ed534593..05bfc6a85 100644 --- a/packages/website/ts/@next/pages/about/team.tsx +++ b/packages/website/ts/@next/pages/about/team.tsx @@ -196,7 +196,7 @@ export const NextAboutTeam = () => ( width="70%" maxWidth="800px" > - + {_.map(team, (info: TeamMember, index: number) => ( ))} @@ -219,7 +219,7 @@ export const NextAboutTeam = () => ( width="70%" maxWidth="800px" > - + {_.map(advisors, (info: TeamMember, index: number) => ( ))} diff --git a/packages/website/ts/@next/pages/instant.tsx b/packages/website/ts/@next/pages/instant.tsx index e8d9e0154..6f78c9bd3 100644 --- a/packages/website/ts/@next/pages/instant.tsx +++ b/packages/website/ts/@next/pages/instant.tsx @@ -14,8 +14,6 @@ import {SiteWrap} from 'ts/@next/components/siteWrap'; import {Heading, Paragraph} from 'ts/@next/components/text'; import { Configurator } from 'ts/@next/pages/instant/configurator'; -const CONFIGURATOR_HASH = 'configure'; - const featuresData = [ { title: 'Support ERC-20 and ERC-721 tokens', @@ -96,7 +94,7 @@ export const Next0xInstant = () => ( 0x Instant Configurator - +