diff options
author | Brandon Millman <brandon.millman@gmail.com> | 2018-06-14 03:01:08 +0800 |
---|---|---|
committer | Brandon Millman <brandon.millman@gmail.com> | 2018-06-14 03:01:08 +0800 |
commit | 14071ea11917c8a50f6817866cecdb0d41915fb8 (patch) | |
tree | a0d48020252cc2fd8c88b02120ec26b56b280e29 /packages/website/ts | |
parent | d0bbee7e8c3eaac1f727a9f40a2213d041938c3b (diff) | |
download | dexon-sol-tools-14071ea11917c8a50f6817866cecdb0d41915fb8.tar dexon-sol-tools-14071ea11917c8a50f6817866cecdb0d41915fb8.tar.gz dexon-sol-tools-14071ea11917c8a50f6817866cecdb0d41915fb8.tar.bz2 dexon-sol-tools-14071ea11917c8a50f6817866cecdb0d41915fb8.tar.lz dexon-sol-tools-14071ea11917c8a50f6817866cecdb0d41915fb8.tar.xz dexon-sol-tools-14071ea11917c8a50f6817866cecdb0d41915fb8.tar.zst dexon-sol-tools-14071ea11917c8a50f6817866cecdb0d41915fb8.zip |
Use spread operator instead of React.createElement
Diffstat (limited to 'packages/website/ts')
-rw-r--r-- | packages/website/ts/pages/jobs/benefits.tsx | 2 | ||||
-rw-r--r-- | packages/website/ts/pages/jobs/teams.tsx | 10 | ||||
-rw-r--r-- | packages/website/ts/pages/jobs/values.tsx | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/packages/website/ts/pages/jobs/benefits.tsx b/packages/website/ts/pages/jobs/benefits.tsx index 8a44eb596..006facc83 100644 --- a/packages/website/ts/pages/jobs/benefits.tsx +++ b/packages/website/ts/pages/jobs/benefits.tsx @@ -75,7 +75,7 @@ export const BenefitsList = () => { return ( <div> <HeaderItem headerText={HEADER_TEXT} /> - {_.map(BENEFIT_ITEM_PROPS_LIST, valueItemProps => React.createElement(BenefitItem, valueItemProps))} + {_.map(BENEFIT_ITEM_PROPS_LIST, valueItemProps => <BenefitItem {...valueItemProps} />)} </div> ); }; diff --git a/packages/website/ts/pages/jobs/teams.tsx b/packages/website/ts/pages/jobs/teams.tsx index 8112351db..80b036396 100644 --- a/packages/website/ts/pages/jobs/teams.tsx +++ b/packages/website/ts/pages/jobs/teams.tsx @@ -48,11 +48,11 @@ const LargeLayout = () => ( <div className="mx-auto max-width-4 clearfix pb4"> <div className="col lg-col-6 md-col-6 col-12"> <HeaderItem headerText={HEADER_TEXT} /> - {_.map(TEAM_ITEM_PROPS_COLUMN1, teamItemProps => React.createElement(TeamItem, teamItemProps))} + {_.map(TEAM_ITEM_PROPS_COLUMN1, teamItemProps => <TeamItem {...teamItemProps} />)} </div> <div className="col lg-col-6 md-col-6 col-12"> <HeaderItem headerText=" " /> - {_.map(TEAM_ITEM_PROPS_COLUMN2, teamItemProps => React.createElement(TeamItem, teamItemProps))} + {_.map(TEAM_ITEM_PROPS_COLUMN2, teamItemProps => <TeamItem {...teamItemProps} />)} </div> </div> ); @@ -60,9 +60,9 @@ const LargeLayout = () => ( const SmallLayout = () => ( <div> <HeaderItem headerText={HEADER_TEXT} /> - {_.map(_.concat(TEAM_ITEM_PROPS_COLUMN1, TEAM_ITEM_PROPS_COLUMN2), teamItemProps => - React.createElement(TeamItem, teamItemProps), - )} + {_.map(_.concat(TEAM_ITEM_PROPS_COLUMN1, TEAM_ITEM_PROPS_COLUMN2), teamItemProps => ( + <TeamItem {...teamItemProps} /> + ))} </div> ); diff --git a/packages/website/ts/pages/jobs/values.tsx b/packages/website/ts/pages/jobs/values.tsx index 799db3d67..ad62754ce 100644 --- a/packages/website/ts/pages/jobs/values.tsx +++ b/packages/website/ts/pages/jobs/values.tsx @@ -29,7 +29,7 @@ export const Values = () => { return ( <div className="mx-auto max-width-4"> <HeaderItem headerText={HEADER_TEXT} /> - {_.map(VALUE_ITEM_PROPS_LIST, valueItemProps => React.createElement(ValueItem, valueItemProps))} + {_.map(VALUE_ITEM_PROPS_LIST, valueItemProps => <ValueItem {...valueItemProps} />)} </div> ); }; |