Skip to content
Snippets Groups Projects
Commit e6d9bb0a authored by Bastien DUMONT's avatar Bastien DUMONT :angel:
Browse files

chore: remove explicit types

parent 88b45de0
No related branches found
No related tags found
2 merge requests!9702.6 Release,!964chore: remove explicit types
Showing
with 42 additions and 43 deletions
...@@ -3,7 +3,7 @@ import defaultIcon from 'assets/icons/visu/ecogesture/default.svg' ...@@ -3,7 +3,7 @@ import defaultIcon from 'assets/icons/visu/ecogesture/default.svg'
import ActionModal from 'components/Action/ActionModal' import ActionModal from 'components/Action/ActionModal'
import StarsContainer from 'components/Challenge/StarsContainer' import StarsContainer from 'components/Challenge/StarsContainer'
import StyledIcon from 'components/CommonKit/Icon/StyledIcon' import StyledIcon from 'components/CommonKit/Icon/StyledIcon'
import { Client, useClient } from 'cozy-client' import { useClient } from 'cozy-client'
import { useI18n } from 'cozy-ui/transpiled/react/I18n' import { useI18n } from 'cozy-ui/transpiled/react/I18n'
import { Ecogesture, UserChallenge } from 'models' import { Ecogesture, UserChallenge } from 'models'
import React, { useCallback, useEffect, useState } from 'react' import React, { useCallback, useEffect, useState } from 'react'
...@@ -23,7 +23,7 @@ const ActionBegin = ({ ...@@ -23,7 +23,7 @@ const ActionBegin = ({
setShowList, setShowList,
userChallenge, userChallenge,
}: ActionBeginProps) => { }: ActionBeginProps) => {
const client: Client = useClient() const client = useClient()
const { t } = useI18n() const { t } = useI18n()
const { const {
global: { fluidTypes }, global: { fluidTypes },
......
import ActionCard from 'components/Action/ActionCard' import ActionCard from 'components/Action/ActionCard'
import { Client, useClient } from 'cozy-client' import { useClient } from 'cozy-client'
import { Ecogesture } from 'models' import { Ecogesture } from 'models'
import React, { useEffect, useState } from 'react' import React, { useEffect, useState } from 'react'
import ActionService from 'services/action.service' import ActionService from 'services/action.service'
...@@ -12,7 +12,7 @@ interface ActionListProps { ...@@ -12,7 +12,7 @@ interface ActionListProps {
} }
const ActionList = ({ setSelectedAction, setShowList }: ActionListProps) => { const ActionList = ({ setSelectedAction, setShowList }: ActionListProps) => {
const client: Client = useClient() const client = useClient()
const { const {
global: { fluidTypes }, global: { fluidTypes },
profile: { isProfileTypeCompleted }, profile: { isProfileTypeCompleted },
......
...@@ -10,7 +10,7 @@ import AnalysisIcon from 'assets/icons/visu/analysis/analysis.svg' ...@@ -10,7 +10,7 @@ import AnalysisIcon from 'assets/icons/visu/analysis/analysis.svg'
import PlaceHolderIcon from 'assets/icons/visu/analysis/no-profile-placeholder.svg' import PlaceHolderIcon from 'assets/icons/visu/analysis/no-profile-placeholder.svg'
import StyledIcon from 'components/CommonKit/Icon/StyledIcon' import StyledIcon from 'components/CommonKit/Icon/StyledIcon'
import Loader from 'components/Loader/Loader' import Loader from 'components/Loader/Loader'
import { Client, useClient } from 'cozy-client' import { useClient } from 'cozy-client'
import { useI18n } from 'cozy-ui/transpiled/react/I18n' import { useI18n } from 'cozy-ui/transpiled/react/I18n'
import Icon from 'cozy-ui/transpiled/react/Icon' import Icon from 'cozy-ui/transpiled/react/Icon'
import { FluidType } from 'enums' import { FluidType } from 'enums'
...@@ -33,8 +33,8 @@ const ProfileComparator = ({ ...@@ -33,8 +33,8 @@ const ProfileComparator = ({
performanceIndicators, performanceIndicators,
}: ProfileComparatorProps) => { }: ProfileComparatorProps) => {
const { t } = useI18n() const { t } = useI18n()
const client = useClient()
const navigate = useNavigate() const navigate = useNavigate()
const client: Client = useClient()
const userPriceConsumption: number = aggregatedPerformanceIndicator.value || 0 const userPriceConsumption: number = aggregatedPerformanceIndicator.value || 0
const { const {
analysis: { analysisMonth }, analysis: { analysisMonth },
......
...@@ -8,7 +8,7 @@ import lockedDuel from 'assets/icons/visu/duel/locked.svg' ...@@ -8,7 +8,7 @@ import lockedDuel from 'assets/icons/visu/duel/locked.svg'
import classNames from 'classnames' import classNames from 'classnames'
import StyledIcon from 'components/CommonKit/Icon/StyledIcon' import StyledIcon from 'components/CommonKit/Icon/StyledIcon'
import Loader from 'components/Loader/Loader' import Loader from 'components/Loader/Loader'
import { Client, useClient } from 'cozy-client' import { useClient } from 'cozy-client'
import { useI18n } from 'cozy-ui/transpiled/react/I18n' import { useI18n } from 'cozy-ui/transpiled/react/I18n'
import { import {
UserActionState, UserActionState,
...@@ -33,8 +33,8 @@ const ChallengeCardOnGoing = ({ ...@@ -33,8 +33,8 @@ const ChallengeCardOnGoing = ({
}: { }: {
userChallenge: UserChallenge userChallenge: UserChallenge
}) => { }) => {
const client: Client = useClient()
const { t } = useI18n() const { t } = useI18n()
const client = useClient()
const navigate = useNavigate() const navigate = useNavigate()
const dispatch = useAppDispatch() const dispatch = useAppDispatch()
const { const {
......
import Button from '@material-ui/core/Button' import Button from '@material-ui/core/Button'
import defaultIcon from 'assets/icons/visu/challenge/challengeLocked.svg' import defaultIcon from 'assets/icons/visu/challenge/challengeLocked.svg'
import StyledIcon from 'components/CommonKit/Icon/StyledIcon' import StyledIcon from 'components/CommonKit/Icon/StyledIcon'
import { Client, useClient } from 'cozy-client' import { useClient } from 'cozy-client'
import { useI18n } from 'cozy-ui/transpiled/react/I18n' import { useI18n } from 'cozy-ui/transpiled/react/I18n'
import { FluidState, UsageEventType } from 'enums' import { FluidState, UsageEventType } from 'enums'
import { UserChallenge } from 'models' import { UserChallenge } from 'models'
...@@ -20,7 +20,7 @@ const ChallengeCardUnlocked = ({ ...@@ -20,7 +20,7 @@ const ChallengeCardUnlocked = ({
userChallenge: UserChallenge userChallenge: UserChallenge
}) => { }) => {
const { t } = useI18n() const { t } = useI18n()
const client: Client = useClient() const client = useClient()
const { const {
challenge: { currentChallenge }, challenge: { currentChallenge },
global: { fluidTypes, fluidStatus }, global: { fluidTypes, fluidStatus },
......
...@@ -6,7 +6,7 @@ import DuelChart from 'components/Duel/DuelChart' ...@@ -6,7 +6,7 @@ import DuelChart from 'components/Duel/DuelChart'
import DuelResultModal from 'components/Duel/DuelResultModal' import DuelResultModal from 'components/Duel/DuelResultModal'
import LastDuelModal from 'components/Duel/lastDuelModal' import LastDuelModal from 'components/Duel/lastDuelModal'
import { useChartResize } from 'components/Hooks/useChartResize' import { useChartResize } from 'components/Hooks/useChartResize'
import { Client, useClient } from 'cozy-client' import { useClient } from 'cozy-client'
import { useI18n } from 'cozy-ui/transpiled/react/I18n' import { useI18n } from 'cozy-ui/transpiled/react/I18n'
import { import {
UsageEventType, UsageEventType,
...@@ -34,8 +34,8 @@ interface DuelOngoingProps { ...@@ -34,8 +34,8 @@ interface DuelOngoingProps {
} }
const DuelOngoing = ({ userChallenge, isFinished }: DuelOngoingProps) => { const DuelOngoing = ({ userChallenge, isFinished }: DuelOngoingProps) => {
const client: Client = useClient()
const { t } = useI18n() const { t } = useI18n()
const client = useClient()
const { currentDataload, userChallengeList } = useAppSelector( const { currentDataload, userChallengeList } = useAppSelector(
state => state.ecolyo.challenge state => state.ecolyo.challenge
) )
......
...@@ -2,7 +2,7 @@ import Button from '@material-ui/core/Button' ...@@ -2,7 +2,7 @@ import Button from '@material-ui/core/Button'
import defaultDuelIcon from 'assets/icons/visu/challenge/CHALLENGE0001.svg' import defaultDuelIcon from 'assets/icons/visu/challenge/CHALLENGE0001.svg'
import defaultIcon from 'assets/icons/visu/duel/default.svg' import defaultIcon from 'assets/icons/visu/duel/default.svg'
import StyledIcon from 'components/CommonKit/Icon/StyledIcon' import StyledIcon from 'components/CommonKit/Icon/StyledIcon'
import { Client, useClient } from 'cozy-client' import { useClient } from 'cozy-client'
import { useI18n } from 'cozy-ui/transpiled/react/I18n' import { useI18n } from 'cozy-ui/transpiled/react/I18n'
import { UsageEventType, UserChallengeUpdateFlag } from 'enums' import { UsageEventType, UserChallengeUpdateFlag } from 'enums'
import { UserChallenge } from 'models' import { UserChallenge } from 'models'
...@@ -16,7 +16,7 @@ import './duelUnlocked.scss' ...@@ -16,7 +16,7 @@ import './duelUnlocked.scss'
const DuelUnlocked = ({ userChallenge }: { userChallenge: UserChallenge }) => { const DuelUnlocked = ({ userChallenge }: { userChallenge: UserChallenge }) => {
const { t } = useI18n() const { t } = useI18n()
const client: Client = useClient() const client = useClient()
const dispatch = useAppDispatch() const dispatch = useAppDispatch()
const [duelIcon, setDuelIcon] = useState(defaultIcon) const [duelIcon, setDuelIcon] = useState(defaultIcon)
......
import Button from '@material-ui/core/Button' import Button from '@material-ui/core/Button'
import starResult from 'assets/icons/visu/quiz/starResult.svg' import starResult from 'assets/icons/visu/quiz/starResult.svg'
import StyledIcon from 'components/CommonKit/Icon/StyledIcon' import StyledIcon from 'components/CommonKit/Icon/StyledIcon'
import { Client, useClient } from 'cozy-client' import { useClient } from 'cozy-client'
import { useI18n } from 'cozy-ui/transpiled/react/I18n' import { useI18n } from 'cozy-ui/transpiled/react/I18n'
import { import {
UsageEventType, UsageEventType,
...@@ -24,7 +24,7 @@ interface ExplorationFinishedProps { ...@@ -24,7 +24,7 @@ interface ExplorationFinishedProps {
const ExplorationFinished = ({ userChallenge }: ExplorationFinishedProps) => { const ExplorationFinished = ({ userChallenge }: ExplorationFinishedProps) => {
const { t } = useI18n() const { t } = useI18n()
const client: Client = useClient() const client = useClient()
const dispatch = useAppDispatch() const dispatch = useAppDispatch()
const navigate = useNavigate() const navigate = useNavigate()
......
...@@ -2,7 +2,7 @@ import Button from '@material-ui/core/Button' ...@@ -2,7 +2,7 @@ import Button from '@material-ui/core/Button'
import explorationIcon from 'assets/icons/visu/exploration/shield.svg' import explorationIcon from 'assets/icons/visu/exploration/shield.svg'
import StarsContainer from 'components/Challenge/StarsContainer' import StarsContainer from 'components/Challenge/StarsContainer'
import StyledIcon from 'components/CommonKit/Icon/StyledIcon' import StyledIcon from 'components/CommonKit/Icon/StyledIcon'
import { Client, useClient } from 'cozy-client' import { useClient } from 'cozy-client'
import { useI18n } from 'cozy-ui/transpiled/react/I18n' import { useI18n } from 'cozy-ui/transpiled/react/I18n'
import { import {
UsageEventType, UsageEventType,
...@@ -25,7 +25,7 @@ interface ExplorationOngoingProps { ...@@ -25,7 +25,7 @@ interface ExplorationOngoingProps {
const ExplorationOngoing = ({ userChallenge }: ExplorationOngoingProps) => { const ExplorationOngoing = ({ userChallenge }: ExplorationOngoingProps) => {
const { t } = useI18n() const { t } = useI18n()
const client: Client = useClient() const client = useClient()
const dispatch = useAppDispatch() const dispatch = useAppDispatch()
const navigate = useNavigate() const navigate = useNavigate()
const startExploration = async () => { const startExploration = async () => {
......
...@@ -5,9 +5,8 @@ import CloseIcon from 'assets/icons/ico/close.svg' ...@@ -5,9 +5,8 @@ import CloseIcon from 'assets/icons/ico/close.svg'
import ecolyoIcon from 'assets/icons/ico/ecolyo.svg' import ecolyoIcon from 'assets/icons/ico/ecolyo.svg'
import StyledIcon from 'components/CommonKit/Icon/StyledIcon' import StyledIcon from 'components/CommonKit/Icon/StyledIcon'
import useExploration from 'components/Hooks/useExploration' import useExploration from 'components/Hooks/useExploration'
import { Client, useClient } from 'cozy-client' import { useClient } from 'cozy-client'
// what is the type ? import { useI18n } from 'cozy-ui/transpiled/react/I18n'
import { IuseI18n, useI18n } from 'cozy-ui/transpiled/react/I18n'
import Icon from 'cozy-ui/transpiled/react/Icon' import Icon from 'cozy-ui/transpiled/react/Icon'
import { UserExplorationID } from 'enums' import { UserExplorationID } from 'enums'
import React from 'react' import React from 'react'
...@@ -18,8 +17,8 @@ import './feedbackModal.scss' ...@@ -18,8 +17,8 @@ import './feedbackModal.scss'
declare let __SAU_LINK__: string declare let __SAU_LINK__: string
const FeedbackModal = () => { const FeedbackModal = () => {
const { t }: IuseI18n = useI18n() const { t } = useI18n()
const client: Client = useClient() const client = useClient()
const dispatch = useAppDispatch() const dispatch = useAppDispatch()
const { isFeedbacksOpen } = useAppSelector(state => state.ecolyo.modal) const { isFeedbacksOpen } = useAppSelector(state => state.ecolyo.modal)
const [, setValidExploration] = useExploration() const [, setValidExploration] = useExploration()
......
import { IuseI18n, useI18n } from 'cozy-ui/transpiled/react/I18n' import { useI18n } from 'cozy-ui/transpiled/react/I18n'
import React from 'react' import React from 'react'
import './halfHourNoData.scss' import './halfHourNoData.scss'
const HalfHourNoData = () => { const HalfHourNoData = () => {
const { t }: IuseI18n = useI18n() const { t } = useI18n()
return ( return (
<div className="halfHour"> <div className="halfHour">
<h2>{t('timestep.half_an_hour.gather_data_title')}</h2> <h2>{t('timestep.half_an_hour.gather_data_title')}</h2>
......
import { Client, useClient } from 'cozy-client' import { useClient } from 'cozy-client'
import { UserExplorationState } from 'enums' import { UserExplorationState } from 'enums'
import { UserExploration } from 'models' import { UserExploration } from 'models'
import { Dispatch, SetStateAction, useEffect, useState } from 'react' import { Dispatch, SetStateAction, useEffect, useState } from 'react'
...@@ -8,7 +8,7 @@ import { toggleChallengeExplorationNotification } from 'store/global/global.slic ...@@ -8,7 +8,7 @@ import { toggleChallengeExplorationNotification } from 'store/global/global.slic
import { useAppDispatch, useAppSelector } from 'store/hooks' import { useAppDispatch, useAppSelector } from 'store/hooks'
const useExploration = (): [string, Dispatch<SetStateAction<string>>] => { const useExploration = (): [string, Dispatch<SetStateAction<string>>] => {
const client: Client = useClient() const client = useClient()
const dispatch = useAppDispatch() const dispatch = useAppDispatch()
const { currentChallenge } = useAppSelector(state => state.ecolyo.challenge) const { currentChallenge } = useAppSelector(state => state.ecolyo.challenge)
const exploration: UserExploration | null = currentChallenge const exploration: UserExploration | null = currentChallenge
......
import * as Sentry from '@sentry/react' import * as Sentry from '@sentry/react'
import { Client, useClient } from 'cozy-client' import { useClient } from 'cozy-client'
import { useI18n } from 'cozy-ui/transpiled/react/I18n' import { useI18n } from 'cozy-ui/transpiled/react/I18n'
import { FluidSlugType, UsageEventType } from 'enums' import { FluidSlugType, UsageEventType } from 'enums'
import { import {
...@@ -23,7 +23,7 @@ const useKonnectorAuth = ( ...@@ -23,7 +23,7 @@ const useKonnectorAuth = (
login?: string, login?: string,
password?: string password?: string
): [() => Promise<null | undefined>, () => Promise<void>, string] => { ): [() => Promise<null | undefined>, () => Promise<void>, string] => {
const client: Client = useClient() const client = useClient()
const { t } = useI18n() const { t } = useI18n()
const dispatch = useAppDispatch() const dispatch = useAppDispatch()
const konnectorSlug: FluidSlugType = const konnectorSlug: FluidSlugType =
......
import { Client, useClient } from 'cozy-client' import { useClient } from 'cozy-client'
import React from 'react' import React from 'react'
import './version.scss' import './version.scss'
const Version = () => { const Version = () => {
const client: Client = useClient() const client = useClient()
return ( return (
<div className="version-root text-14-normal"> <div className="version-root text-14-normal">
{`v ${client.appMetadata.version}`} {`v ${client.appMetadata.version}`}
......
...@@ -2,7 +2,7 @@ import Button from '@material-ui/core/Button' ...@@ -2,7 +2,7 @@ import Button from '@material-ui/core/Button'
import quizIcon from 'assets/icons/visu/quiz/questionMark.svg' import quizIcon from 'assets/icons/visu/quiz/questionMark.svg'
import StarsContainer from 'components/Challenge/StarsContainer' import StarsContainer from 'components/Challenge/StarsContainer'
import StyledIcon from 'components/CommonKit/Icon/StyledIcon' import StyledIcon from 'components/CommonKit/Icon/StyledIcon'
import { Client, useClient } from 'cozy-client' import { useClient } from 'cozy-client'
import { useI18n } from 'cozy-ui/transpiled/react/I18n' import { useI18n } from 'cozy-ui/transpiled/react/I18n'
import { UserChallengeUpdateFlag } from 'enums' import { UserChallengeUpdateFlag } from 'enums'
import { UserChallenge } from 'models' import { UserChallenge } from 'models'
...@@ -13,7 +13,7 @@ import { useAppDispatch } from 'store/hooks' ...@@ -13,7 +13,7 @@ import { useAppDispatch } from 'store/hooks'
import './quizBegin.scss' import './quizBegin.scss'
const QuizBegin = ({ userChallenge }: { userChallenge: UserChallenge }) => { const QuizBegin = ({ userChallenge }: { userChallenge: UserChallenge }) => {
const client: Client = useClient() const client = useClient()
const { t } = useI18n() const { t } = useI18n()
const dispatch = useAppDispatch() const dispatch = useAppDispatch()
const launchQuiz = async () => { const launchQuiz = async () => {
......
...@@ -3,7 +3,7 @@ import CloseIcon from 'assets/icons/ico/close.svg' ...@@ -3,7 +3,7 @@ import CloseIcon from 'assets/icons/ico/close.svg'
import StyledIconButton from 'components/CommonKit/IconButton/StyledIconButton' import StyledIconButton from 'components/CommonKit/IconButton/StyledIconButton'
import Loader from 'components/Loader/Loader' import Loader from 'components/Loader/Loader'
import QuizExplanationModal from 'components/Quiz/QuizExplanationModal' import QuizExplanationModal from 'components/Quiz/QuizExplanationModal'
import { Client, useClient } from 'cozy-client' import { useClient } from 'cozy-client'
import { useI18n } from 'cozy-ui/transpiled/react/I18n' import { useI18n } from 'cozy-ui/transpiled/react/I18n'
import { UsageEventType, UserChallengeUpdateFlag } from 'enums' import { UsageEventType, UserChallengeUpdateFlag } from 'enums'
import { Answer, QuestionEntity, UserChallenge, UserQuiz } from 'models' import { Answer, QuestionEntity, UserChallenge, UserQuiz } from 'models'
...@@ -29,7 +29,7 @@ const QuizCustomQuestionContent = ({ ...@@ -29,7 +29,7 @@ const QuizCustomQuestionContent = ({
isLoading, isLoading,
}: QuizCustomQuestionContent) => { }: QuizCustomQuestionContent) => {
const { t } = useI18n() const { t } = useI18n()
const client: Client = useClient() const client = useClient()
const dispatch = useAppDispatch() const dispatch = useAppDispatch()
const [userChoice, setUserChoice] = useState<string>('') const [userChoice, setUserChoice] = useState<string>('')
......
import Button from '@material-ui/core/Button' import Button from '@material-ui/core/Button'
import starResult from 'assets/icons/visu/quiz/starResult.svg' import starResult from 'assets/icons/visu/quiz/starResult.svg'
import StyledIcon from 'components/CommonKit/Icon/StyledIcon' import StyledIcon from 'components/CommonKit/Icon/StyledIcon'
import { Client, useClient } from 'cozy-client' import { useClient } from 'cozy-client'
import { useI18n } from 'cozy-ui/transpiled/react/I18n' import { useI18n } from 'cozy-ui/transpiled/react/I18n'
import { UserChallengeUpdateFlag } from 'enums' import { UserChallengeUpdateFlag } from 'enums'
import { UserChallenge } from 'models' import { UserChallenge } from 'models'
...@@ -14,7 +14,7 @@ import './quizFinish.scss' ...@@ -14,7 +14,7 @@ import './quizFinish.scss'
const QuizFinish = ({ userChallenge }: { userChallenge: UserChallenge }) => { const QuizFinish = ({ userChallenge }: { userChallenge: UserChallenge }) => {
const { t } = useI18n() const { t } = useI18n()
const client: Client = useClient() const client = useClient()
const navigate = useNavigate() const navigate = useNavigate()
const dispatch = useAppDispatch() const dispatch = useAppDispatch()
const challengeService: ChallengeService = useMemo( const challengeService: ChallengeService = useMemo(
......
import QuizCustomQuestionContent from 'components/Quiz/QuizCustomQuestionContent' import QuizCustomQuestionContent from 'components/Quiz/QuizCustomQuestionContent'
import QuizQuestionContent from 'components/Quiz/QuizQuestionContent' import QuizQuestionContent from 'components/Quiz/QuizQuestionContent'
import { Client, useClient } from 'cozy-client' import { useClient } from 'cozy-client'
import { QuestionEntity, UserChallenge } from 'models' import { QuestionEntity, UserChallenge } from 'models'
import React, { useEffect, useState } from 'react' import React, { useEffect, useState } from 'react'
import { useNavigate } from 'react-router-dom' import { useNavigate } from 'react-router-dom'
...@@ -9,6 +9,9 @@ import { useAppSelector } from 'store/hooks' ...@@ -9,6 +9,9 @@ import { useAppSelector } from 'store/hooks'
import './quizQuestion.scss' import './quizQuestion.scss'
const QuizQuestion = ({ userChallenge }: { userChallenge: UserChallenge }) => { const QuizQuestion = ({ userChallenge }: { userChallenge: UserChallenge }) => {
const client = useClient()
const navigate = useNavigate()
const { fluidTypes } = useAppSelector(state => state.ecolyo.global)
const questionsIsLocked: boolean = userChallenge.quiz.questions.some( const questionsIsLocked: boolean = userChallenge.quiz.questions.some(
answer => answer.result == 0 answer => answer.result == 0
) )
...@@ -18,9 +21,6 @@ const QuizQuestion = ({ userChallenge }: { userChallenge: UserChallenge }) => { ...@@ -18,9 +21,6 @@ const QuizQuestion = ({ userChallenge }: { userChallenge: UserChallenge }) => {
) )
const [customQuestionLoading, setCustomQuestionLoading] = const [customQuestionLoading, setCustomQuestionLoading] =
useState<boolean>(false) useState<boolean>(false)
const client: Client = useClient()
const { fluidTypes } = useAppSelector(state => state.ecolyo.global)
const navigate = useNavigate()
const goBack = () => { const goBack = () => {
navigate('/challenges') navigate('/challenges')
......
...@@ -2,7 +2,7 @@ import Button from '@material-ui/core/Button' ...@@ -2,7 +2,7 @@ import Button from '@material-ui/core/Button'
import CloseIcon from 'assets/icons/ico/close.svg' import CloseIcon from 'assets/icons/ico/close.svg'
import StyledIconButton from 'components/CommonKit/IconButton/StyledIconButton' import StyledIconButton from 'components/CommonKit/IconButton/StyledIconButton'
import QuizExplanationModal from 'components/Quiz/QuizExplanationModal' import QuizExplanationModal from 'components/Quiz/QuizExplanationModal'
import { Client, useClient } from 'cozy-client' import { useClient } from 'cozy-client'
import { useI18n } from 'cozy-ui/transpiled/react/I18n' import { useI18n } from 'cozy-ui/transpiled/react/I18n'
import { UserChallengeUpdateFlag } from 'enums' import { UserChallengeUpdateFlag } from 'enums'
import { Answer, UserChallenge, UserQuiz } from 'models' import { Answer, UserChallenge, UserQuiz } from 'models'
...@@ -25,7 +25,7 @@ const QuizQuestionContent = ({ ...@@ -25,7 +25,7 @@ const QuizQuestionContent = ({
goBack, goBack,
}: QuizQuestionContent) => { }: QuizQuestionContent) => {
const { t } = useI18n() const { t } = useI18n()
const client: Client = useClient() const client = useClient()
const dispatch = useAppDispatch() const dispatch = useAppDispatch()
const questionIndexLocked = userChallenge.quiz.questions.findIndex( const questionIndexLocked = userChallenge.quiz.questions.findIndex(
answer => answer.result == 0 answer => answer.result == 0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment