diff --git a/src/components/Ecogesture/SingleEcogesture.tsx b/src/components/Ecogesture/SingleEcogesture.tsx index 93a6a28f81c8f1b1b50709d156a2a54add8567ea..385db2a333c917d9758c5fa0c302b583422ff782 100644 --- a/src/components/Ecogesture/SingleEcogesture.tsx +++ b/src/components/Ecogesture/SingleEcogesture.tsx @@ -17,7 +17,7 @@ import { useI18n } from 'cozy-ui/transpiled/react/I18n' import Icon from 'cozy-ui/transpiled/react/Icon' import { Ecogesture } from 'models' import React, { useCallback, useEffect, useMemo, useState } from 'react' -import { Location, useLocation, useNavigate, useParams } from 'react-router-dom' +import { Location, useLocation, useParams } from 'react-router-dom' import EcogestureService from 'services/ecogesture.service' import { useAppSelector } from 'store/hooks' import { importIconById } from 'utils/utils' @@ -33,7 +33,6 @@ interface EcogestureLocation extends Location { const SingleEcogesture = () => { const { t } = useI18n() const client = useClient() - const navigate = useNavigate() const location: EcogestureLocation = useLocation() const [ecogesture, setEcogesture] = useState<Ecogesture>() const [ecogestureIcon, setEcogestureIcon] = useState<string>('') @@ -122,11 +121,7 @@ const SingleEcogesture = () => { if (ecogesture) { return ( <> - <CozyBar - titleKey={'common.title_ecogesture'} - displayBackArrow={true} - backFunction={() => navigate('/ecogestures')} - /> + <CozyBar titleKey={'common.title_ecogesture'} displayBackArrow={true} /> <Header setHeaderHeight={defineHeaderHeight} desktopTitleKey={'common.title_ecogesture'} diff --git a/src/components/Ecogesture/__snapshots__/SingleEcogesture.spec.tsx.snap b/src/components/Ecogesture/__snapshots__/SingleEcogesture.spec.tsx.snap index 2eb812c6fea8317a280b716740e2bb8956c4dd16..031efb6101e9a404125892a2b52c39d58e84ef2f 100644 --- a/src/components/Ecogesture/__snapshots__/SingleEcogesture.spec.tsx.snap +++ b/src/components/Ecogesture/__snapshots__/SingleEcogesture.spec.tsx.snap @@ -15,7 +15,6 @@ exports[`SingleEcogesture component should be rendered correctly 1`] = ` > <SingleEcogesture> <Component - backFunction={[Function]} displayBackArrow={true} titleKey="common.title_ecogesture" >