From b4855345fdedf5f1299f5ecf2fa73b96c01ae093 Mon Sep 17 00:00:00 2001 From: "guilhem.carron" <gcarron@grandlyon.com> Date: Thu, 16 Sep 2021 15:10:11 +0200 Subject: [PATCH] Fix review issues --- src/components/GCU/gcuContent.scss | 6 ++---- src/components/LegalNotice/legalNoticeLink.scss | 2 +- src/components/Routes/Routes.tsx | 8 ++++++-- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/components/GCU/gcuContent.scss b/src/components/GCU/gcuContent.scss index 1e8ef689f..2e397e5dc 100644 --- a/src/components/GCU/gcuContent.scss +++ b/src/components/GCU/gcuContent.scss @@ -10,12 +10,10 @@ text-align: left; padding: 0 2rem; .gcu-content-wrapper { - width: 36rem; + max-width: 36rem; margin: 2rem 0; color: $grey-bright; - @media #{$large-phone} { - width: 100%; - } + width: 100%; .version { color: $soft-grey; text-align: center; diff --git a/src/components/LegalNotice/legalNoticeLink.scss b/src/components/LegalNotice/legalNoticeLink.scss index 6998b06d0..402a22fc2 100644 --- a/src/components/LegalNotice/legalNoticeLink.scss +++ b/src/components/LegalNotice/legalNoticeLink.scss @@ -15,7 +15,7 @@ } .legal-notice-content { max-width: 45.75rem; - + width: 100%; @media #{$large-phone} { width: 100%; } diff --git a/src/components/Routes/Routes.tsx b/src/components/Routes/Routes.tsx index 70f4af979..57a7c92b3 100644 --- a/src/components/Routes/Routes.tsx +++ b/src/components/Routes/Routes.tsx @@ -7,6 +7,7 @@ import QuizView from 'components/Quiz/QuizView' import ExplorationView from 'components/Exploration/ExplorationView' import ActionView from 'components/Action/ActionView' import UnSubscribe from 'components/Options/UnSubscribe' +import TermsView from 'components/Terms/TermsView' const HomeView = lazy(() => import('components/Home/HomeView')) const SingleFluidView = lazy(() => @@ -26,7 +27,7 @@ const AnalysisView = lazy(() => import('components/Analysis/AnalysisView')) const ProfileTypeView = lazy(() => import('components/ProfileType/ProfileTypeView') ) -const TermsView = lazy(() => import('components/Terms/TermsView')) +// const TermsView = lazy(() => import('components/Terms/TermsView')) interface RouteProps { isLastTermAccepted: boolean @@ -35,12 +36,15 @@ const Routes: React.FC<RouteProps> = ({ isLastTermAccepted }: RouteProps) => { return ( <Suspense fallback={<div></div>}> <Switch> + {isLastTermAccepted && <Redirect from="/terms" to="/consumption" />} + <Route path="/terms" component={TermsView} /> {!isLastTermAccepted && ( <> - <Route path="/terms" component={TermsView} /> <Redirect from="*" to="/terms" /> + <Redirect from="/" to="/terms" /> </> )} + <Route path="/consumption" render={({ match: { url } }) => ( -- GitLab