From 22736759c1e1d5ae093035dbf000aaf023ff5d97 Mon Sep 17 00:00:00 2001 From: mattyl006 Date: Mon, 18 Jul 2022 11:58:29 +0200 Subject: [PATCH] mobile Challenge menu option green when active and correct header alignment --- src/components/elements/MobileChallengeMenu.js | 11 ++++++----- src/pages/Challenge.js | 4 ++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/components/elements/MobileChallengeMenu.js b/src/components/elements/MobileChallengeMenu.js index 7b39ded..656db0d 100644 --- a/src/components/elements/MobileChallengeMenu.js +++ b/src/components/elements/MobileChallengeMenu.js @@ -6,6 +6,7 @@ import {Medium} from "../../utils/fonts"; const MenuOption = styled(Medium)` cursor: pointer; transition: color 0.3s ease-in-out; + color: ${({theme, active}) => active ? theme.colors.green : theme.colors.dark}; &:hover { color: ${({theme}) => theme.colors.green}; @@ -16,21 +17,21 @@ const MobileChallengeMenu = (props) => { return ( <> - props.setSection(0)}> + props.setSection(0)}> Leaderboard - props.setSection(1)}> + props.setSection(1)}> Readme - props.setSection(2)}> + props.setSection(2)}> How to - props.setSection(4)}> + props.setSection(3)}> My entries - props.setSection(3)}> + props.setSection(4)}> Submit diff --git a/src/pages/Challenge.js b/src/pages/Challenge.js index 53d07d5..576b455 100644 --- a/src/pages/Challenge.js +++ b/src/pages/Challenge.js @@ -54,10 +54,10 @@ const Challenge = () => { const mobileRender = () => { return ( -

+

{getChallenge().title}

- + {sectionRender()}