From 38be37635571f85a5113fed9ce65d92a2eaff796 Mon Sep 17 00:00:00 2001 From: Nick Van Doorn Date: Sat, 6 Apr 2019 12:39:37 -0700 Subject: Factor out array of themes --- src/components/layout.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/components') diff --git a/src/components/layout.js b/src/components/layout.js index fcc942e..afb3f8e 100644 --- a/src/components/layout.js +++ b/src/components/layout.js @@ -67,6 +67,11 @@ const siteData = { ] } +const themeSwitcherThemes = [ + { name: '👔', key: 'mainTheme' }, + { name: '📰', key: 'highContrastTheme' } +] + const getThemeKeyFromUrl = () => { const queryObj = parseQuery() return queryObj && queryObj.themeKey @@ -109,14 +114,10 @@ export default class Layout extends Component { links={siteData.navLinks} socialEntries={siteData.socialEntries} /> - {children} this.changeTheme(t)} /> -- cgit v1.2.3