From ef371ebd0f1c12dc1131e7fbd26fec13017a6133 Mon Sep 17 00:00:00 2001 From: Etienne LOUPIAS <eloupias@grandlyon.com> Date: Mon, 2 May 2022 07:06:07 +0000 Subject: [PATCH] feat(challenge): remove banner --- src/components/Challenge/ChallengeView.tsx | 7 +---- .../__snapshots__/ChallengeView.spec.tsx.snap | 16 ---------- src/components/Challenge/challengeView.scss | 29 ------------------- src/components/Header/CozyBar.tsx | 18 ++---------- src/components/Header/Header.tsx | 14 +-------- src/locales/fr.json | 4 --- 6 files changed, 5 insertions(+), 83 deletions(-) diff --git a/src/components/Challenge/ChallengeView.tsx b/src/components/Challenge/ChallengeView.tsx index 17fd42277..0b1c7d76c 100644 --- a/src/components/Challenge/ChallengeView.tsx +++ b/src/components/Challenge/ChallengeView.tsx @@ -131,11 +131,10 @@ const ChallengeView: React.FC = () => { return ( <> - <CozyBar titleKey={'common.title_challenge'} isBuilding={true} /> + <CozyBar titleKey={'common.title_challenge'} /> <Header setHeaderHeight={defineHeaderHeight} desktopTitleKey={'common.title_challenge'} - isBuilding={true} ></Header> <Content height={headerHeight}> <div @@ -148,10 +147,6 @@ const ChallengeView: React.FC = () => { onMouseMove={handleClickOrTouchMove} onMouseUp={handleClickOrTouchEnd} > - <div className="building-banner"> - <div className="title">{t('challenge.banner.title')}</div> - <div className="content">{t('challenge.banner.content')}</div> - </div> <div className="challenge-container" style={{ diff --git a/src/components/Challenge/__snapshots__/ChallengeView.spec.tsx.snap b/src/components/Challenge/__snapshots__/ChallengeView.spec.tsx.snap index 5f7dfa0f9..ee1c09130 100644 --- a/src/components/Challenge/__snapshots__/ChallengeView.spec.tsx.snap +++ b/src/components/Challenge/__snapshots__/ChallengeView.spec.tsx.snap @@ -3,12 +3,10 @@ exports[`ChallengeView component should be rendered correctly 1`] = ` <React.Fragment> <CozyBar - isBuilding={true} titleKey="common.title_challenge" /> <Header desktopTitleKey="common.title_challenge" - isBuilding={true} setHeaderHeight={[Function]} /> <Content @@ -24,20 +22,6 @@ exports[`ChallengeView component should be rendered correctly 1`] = ` onTouchMove={[Function]} onTouchStart={[Function]} > - <div - className="building-banner" - > - <div - className="title" - > - challenge.banner.title - </div> - <div - className="content" - > - challenge.banner.content - </div> - </div> <div className="challenge-container" style={ diff --git a/src/components/Challenge/challengeView.scss b/src/components/Challenge/challengeView.scss index 31e0d2537..86d163ea2 100644 --- a/src/components/Challenge/challengeView.scss +++ b/src/components/Challenge/challengeView.scss @@ -12,35 +12,6 @@ align-items: center; padding: 0 2rem; } -.building-banner { - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - background: linear-gradient( - 45deg, - #e3b82a 25%, - #e2a70d 25%, - #e2a70d 50%, - #e3b82a 50%, - #e3b82a 75%, - #e2a70d 75%, - #e2a70d 100% - ); - background-size: 56.57px 56.57px; - width: -webkit-fill-available; - box-sizing: border-box; - padding: 0.5rem 1rem; - text-align: center; - height: 75px; - margin: 1rem -1rem 0; - z-index: calc(#{$z-header} - 1); - border-radius: 6px; - .title { - font-weight: 700; - margin-bottom: 0.1rem; - } -} .challenge-container { position: relative; width: 100%; diff --git a/src/components/Header/CozyBar.tsx b/src/components/Header/CozyBar.tsx index 7f56b78d9..e25b1c970 100644 --- a/src/components/Header/CozyBar.tsx +++ b/src/components/Header/CozyBar.tsx @@ -16,7 +16,6 @@ import StyledIconButton from 'components/CommonKit/IconButton/StyledIconButton' interface CozyBarProps { titleKey?: string displayBackArrow?: boolean - isBuilding?: boolean isNotKey?: boolean backFunction?: () => void } @@ -24,7 +23,6 @@ interface CozyBarProps { const CozyBar = ({ titleKey = 'common.title_app', displayBackArrow = false, - isBuilding, isNotKey, backFunction, }: CozyBarProps) => { @@ -62,19 +60,9 @@ const CozyBar = ({ )} <BarCenter> <div className="cozy-bar"> - {isBuilding ? ( - <> - <Icon icon={HammerLeft} size={17} /> - <span className="app-title isBuilding"> - {isNotKey ? titleKey : t(titleKey)} - </span> - <Icon icon={HammerRight} size={17} /> - </> - ) : ( - <span className="app-title"> - {isNotKey ? titleKey : t(titleKey)} - </span> - )} + <span className="app-title"> + {isNotKey ? titleKey : t(titleKey)} + </span> </div> </BarCenter> <BarRight> diff --git a/src/components/Header/Header.tsx b/src/components/Header/Header.tsx index d3045cc0f..2d10f4b38 100644 --- a/src/components/Header/Header.tsx +++ b/src/components/Header/Header.tsx @@ -22,7 +22,6 @@ interface HeaderProps { displayBackArrow?: boolean children?: React.ReactNode setHeaderHeight(height: number): void - isBuilding?: boolean isNotKey?: boolean backFunction?: () => void } @@ -33,7 +32,6 @@ const Header: React.FC<HeaderProps> = ({ displayBackArrow, children, setHeaderHeight, - isBuilding, isNotKey, backFunction, }: HeaderProps) => { @@ -107,17 +105,7 @@ const Header: React.FC<HeaderProps> = ({ </IconButton> )} {/* {t(desktopTitleKey)} */} - {isBuilding ? ( - <> - <div className="building-title"> - <Icon icon={HammerLeft} size={17} /> - <span className="isBuilding">{t(desktopTitleKey)}</span> - <Icon icon={HammerRight} size={17} /> - </div> - </> - ) : ( - <span>{isNotKey ? desktopTitleKey : t(desktopTitleKey)}</span> - )} + <span>{isNotKey ? desktopTitleKey : t(desktopTitleKey)}</span> </div> )} <IconButton diff --git a/src/locales/fr.json b/src/locales/fr.json index 147c7f91e..1a8cecda0 100644 --- a/src/locales/fr.json +++ b/src/locales/fr.json @@ -210,10 +210,6 @@ } }, "challenge": { - "banner": { - "title": "Nouvelle section prochainement", - "content": "Nous traitons actuellement les retours des utilisateurs afin d'améliorer les défis" - }, "card": { "ongoing": { "quiz": "Quiz", -- GitLab