diff options
author | August Skare <post@augustskare.no> | 2018-11-20 22:15:17 +0800 |
---|---|---|
committer | August Skare <post@augustskare.no> | 2018-11-20 22:15:17 +0800 |
commit | b0c22a222e09ef8008a1ef7cf79e28b73961560a (patch) | |
tree | fb98563e385620607b962f1ef0726676fd2c29dd /packages/dev-tools-pages/ts/components | |
parent | ea1805058924e12a18bcc4f9de712bfade64c595 (diff) | |
download | dexon-0x-contracts-b0c22a222e09ef8008a1ef7cf79e28b73961560a.tar.gz dexon-0x-contracts-b0c22a222e09ef8008a1ef7cf79e28b73961560a.tar.zst dexon-0x-contracts-b0c22a222e09ef8008a1ef7cf79e28b73961560a.zip |
use lodash.map insted of array.map
Diffstat (limited to 'packages/dev-tools-pages/ts/components')
-rw-r--r-- | packages/dev-tools-pages/ts/components/compiler.tsx | 3 | ||||
-rw-r--r-- | packages/dev-tools-pages/ts/components/footer.tsx | 3 | ||||
-rw-r--r-- | packages/dev-tools-pages/ts/components/list.tsx | 3 |
3 files changed, 6 insertions, 3 deletions
diff --git a/packages/dev-tools-pages/ts/components/compiler.tsx b/packages/dev-tools-pages/ts/components/compiler.tsx index c535795aa..d576e3b72 100644 --- a/packages/dev-tools-pages/ts/components/compiler.tsx +++ b/packages/dev-tools-pages/ts/components/compiler.tsx @@ -1,5 +1,6 @@ import * as React from 'react'; import styled from 'styled-components'; +import * as _ from 'lodash'; import { colors, media } from 'ts/variables'; @@ -75,7 +76,7 @@ const Compiler: React.StatelessComponent<{}> = () => ( <Container> <Breakout> <Cards> - {cards.map(card => ( + {_.map(cards, card => ( <Card key={card.title.split(' ').join('-')}> <Dt>{card.title}</Dt> <Dd>{card.body}</Dd> diff --git a/packages/dev-tools-pages/ts/components/footer.tsx b/packages/dev-tools-pages/ts/components/footer.tsx index 110d21443..4b911ce35 100644 --- a/packages/dev-tools-pages/ts/components/footer.tsx +++ b/packages/dev-tools-pages/ts/components/footer.tsx @@ -1,5 +1,6 @@ import * as React from 'react'; import styled from 'styled-components'; +import * as _ from 'lodash'; import { context as compiler } from 'ts/context/compiler'; import { context as cov } from 'ts/context/cov'; @@ -19,7 +20,7 @@ const Footer: React.StatelessComponent<{}> = () => ( <Top> <Alpha>Other tools by 0x</Alpha> <List> - {tools.map(({ title, subtitle, icon }) => ( + {_.map(tools, ({ title, subtitle, icon }) => ( <ListItem key={title}> <ListLink href="#"> <Icon as={icon} /> diff --git a/packages/dev-tools-pages/ts/components/list.tsx b/packages/dev-tools-pages/ts/components/list.tsx index 12d5d67a9..6d4839e88 100644 --- a/packages/dev-tools-pages/ts/components/list.tsx +++ b/packages/dev-tools-pages/ts/components/list.tsx @@ -1,5 +1,6 @@ import * as React from 'react'; import styled from 'styled-components'; +import * as _ from 'lodash'; import { media } from 'ts/variables'; @@ -42,7 +43,7 @@ const List: React.StatelessComponent<ListProps> = props => ( <StyledList> {props.children !== undefined ? props.children - : props.items.map((bullet, index) => <StyledItem key={index}>{bullet}</StyledItem>)} + : _.map(props.items, (bullet, index) => <StyledItem key={index}>{bullet}</StyledItem>)} </StyledList> ); |