Skip to content
Snippets Groups Projects
Commit 2f7f9dcf authored by HAUTBOIS Aurelie's avatar HAUTBOIS Aurelie
Browse files

feat: modify exploration view

parent 21184cdc
No related branches found
No related tags found
1 merge request!189features/US286-create_mission_view
...@@ -4,7 +4,7 @@ import { AppStore } from 'store' ...@@ -4,7 +4,7 @@ import { AppStore } from 'store'
import CozyBar from 'components/Header/CozyBar' import CozyBar from 'components/Header/CozyBar'
import Content from 'components/Content/Content' import Content from 'components/Content/Content'
import Header from 'components/Header/Header' import Header from 'components/Header/Header'
import { UserMissionState } from 'enum/userMission.enum' import { UserExplorationState } from 'enum/userExploration.enum'
import { UserChallenge } from 'models' import { UserChallenge } from 'models'
const ExplorationView: React.FC = () => { const ExplorationView: React.FC = () => {
...@@ -17,11 +17,11 @@ const ExplorationView: React.FC = () => { ...@@ -17,11 +17,11 @@ const ExplorationView: React.FC = () => {
setHeaderHeight(height) setHeaderHeight(height)
}, []) }, [])
const renderMission = (challenge: UserChallenge) => { const renderExploration = (challenge: UserChallenge) => {
switch (challenge.mission.state) { switch (challenge.exploration.state) {
case UserMissionState.UNLOCKED: case UserExplorationState.UNLOCKED:
return 'ExplorationOngoing' return 'ExplorationOngoing'
case UserMissionState.DONE: case UserExplorationState.DONE:
return 'ExplorationFinished' return 'ExplorationFinished'
default: default:
return 'ExplorationOnGoing' return 'ExplorationOnGoing'
...@@ -30,14 +30,17 @@ const ExplorationView: React.FC = () => { ...@@ -30,14 +30,17 @@ const ExplorationView: React.FC = () => {
return ( return (
<> <>
<CozyBar titleKey={'COMMON.APP_QUIZ_TITLE'} displayBackArrow={true} /> <CozyBar
titleKey={'COMMON.APP_EXPLORATION_TITLE'}
displayBackArrow={true}
/>
<Header <Header
setHeaderHeight={defineHeaderHeight} setHeaderHeight={defineHeaderHeight}
desktopTitleKey={'COMMON.APP_QUIZ_TITLE'} desktopTitleKey={'COMMON.APP_EXPLORATION_TITLE'}
displayBackArrow={true} displayBackArrow={true}
></Header> ></Header>
<Content height={headerHeight}> <Content height={headerHeight}>
{currentChallenge && renderMission(currentChallenge)} {currentChallenge && renderExploration(currentChallenge)}
</Content> </Content>
</> </>
) )
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
"APP_TITLE": "Ecolyo", "APP_TITLE": "Ecolyo",
"APP_CHALLENGE_TITLE": "Défi", "APP_CHALLENGE_TITLE": "Défi",
"APP_QUIZ_TITLE": "Quiz", "APP_QUIZ_TITLE": "Quiz",
"APP_EXPLORATION_TITLE": "Exploration",
"APP_DUEL_TITLE": "Duel final", "APP_DUEL_TITLE": "Duel final",
"APP_ECO_GESTURE_TITLE": "Ecogestes", "APP_ECO_GESTURE_TITLE": "Ecogestes",
"APP_OPTIONS_TITLE": "Options", "APP_OPTIONS_TITLE": "Options",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment