From 86b19031e99c8b494c6ea9eae63878c885959df9 Mon Sep 17 00:00:00 2001 From: Stuart Taylor Date: Tue, 13 Mar 2018 20:35:30 +0000 Subject: [PATCH] fix(nav): DRY Nav render method --- common/app/Nav/Nav.jsx | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/common/app/Nav/Nav.jsx b/common/app/Nav/Nav.jsx index 1e41d1b155..9fd70567ca 100644 --- a/common/app/Nav/Nav.jsx +++ b/common/app/Nav/Nav.jsx @@ -62,6 +62,12 @@ function mergeProps(stateProps, dispatchProps, ownProps) { }; } +const allNavs = [ + LargeNav, + MediumNav, + SmallNav +]; + function FCCNav(props) { const { panes, @@ -69,30 +75,24 @@ function FCCNav(props) { clickOnMap, shouldShowMapButton } = props; + const withNavProps = Component => ( + + ); return ( - - - + { + allNavs.map(withNavProps) + } ); }