diff --git a/src/components/Ecogesture/EcogestureCard.tsx b/src/components/Ecogesture/EcogestureCard.tsx index a462309dc1ac2cd66d7cf9a8605804537f756576..5e9311124a90512a769afd1cdf4dd0caf24326c9 100644 --- a/src/components/Ecogesture/EcogestureCard.tsx +++ b/src/components/Ecogesture/EcogestureCard.tsx @@ -8,16 +8,13 @@ import EfficientyRating from './EfficientyRating' import defaultIcon from 'assets/icons/visu/ecogesture/default.svg' import { Link as RouterLink } from 'react-router-dom' import { Link } from '@material-ui/core/' -import { EcogestureStatus } from 'enum/ecogesture.enum' interface EcogestureCardProps { ecogesture: Ecogesture - currentTab: EcogestureStatus } const EcogestureCard: React.FC<EcogestureCardProps> = ({ ecogesture, - currentTab, }: EcogestureCardProps) => { const [ecogestureIcon, setEcogestureIcon] = useState<string>('') useEffect(() => { @@ -36,7 +33,7 @@ const EcogestureCard: React.FC<EcogestureCardProps> = ({ return ( <Link - to={`/ecogesture/${ecogesture.id}/${currentTab}`} + to={`/ecogesture/${ecogesture.id}`} component={RouterLink} className="ecogesture-list-item" > diff --git a/src/components/Ecogesture/EcogestureList.tsx b/src/components/Ecogesture/EcogestureList.tsx index ccf7ef7ab1c05ff587d6bb5673d56f94ba049cd3..f791c5e697fd3eaf979788df503370cca4224c8d 100644 --- a/src/components/Ecogesture/EcogestureList.tsx +++ b/src/components/Ecogesture/EcogestureList.tsx @@ -10,16 +10,14 @@ import EcogestureCard from 'components/Ecogesture/EcogestureCard' import StyledIcon from 'components/CommonKit/Icon/StyledIcon' import Button from '@material-ui/core/Button' import './ecogestureList.scss' -import { EcogestureStatus, Usage } from 'enum/ecogesture.enum' +import { Usage } from 'enum/ecogesture.enum' interface EcogestureListProps { list: Ecogesture[] - currentTab: EcogestureStatus } const EcogestureList: React.FC<EcogestureListProps> = ({ list, - currentTab, }: EcogestureListProps) => { const { t } = useI18n() const [activeFilter, setactiveFilter] = useState<string>(Usage[Usage.ALL]) @@ -43,7 +41,7 @@ const EcogestureList: React.FC<EcogestureListProps> = ({ .filter(ecogesture => Usage[ecogesture.usage] === activeFilter) .map((ecogesture, index) => ( <div key={index} className="ecogesture-list-item"> - <EcogestureCard ecogesture={ecogesture} currentTab={currentTab} /> + <EcogestureCard ecogesture={ecogesture} /> </div> )) if (filtered.length > 0) { @@ -133,11 +131,7 @@ const EcogestureList: React.FC<EcogestureListProps> = ({ <div className="ecogesture-content"> {list && activeFilter === Usage[Usage.ALL] ? ( list.map((ecogesture, index) => ( - <EcogestureCard - ecogesture={ecogesture} - key={index} - currentTab={currentTab} - /> + <EcogestureCard ecogesture={ecogesture} key={index} /> )) ) : list && activeFilter !== Usage[Usage.ALL] ? ( filterEcogesture(list) diff --git a/src/components/Ecogesture/EcogestureView.spec.tsx b/src/components/Ecogesture/EcogestureView.spec.tsx index 36bf6fc9cd7d039efdb31149d2df02568aee0352..540542538dedfea2d4d7b20d3eb3d55c108e7a26 100644 --- a/src/components/Ecogesture/EcogestureView.spec.tsx +++ b/src/components/Ecogesture/EcogestureView.spec.tsx @@ -59,6 +59,19 @@ jest.mock('utils/utils', () => { }) const useSelectorSpy = jest.spyOn(reactRedux, 'useSelector') +const mockHistoryGoBack = jest.fn() +jest.mock('react-router-dom', () => ({ + ...jest.requireActual('react-router-dom'), + useLocation: () => { + return { + search: '', + } + }, + useHistory: () => ({ + push: mockHistoryGoBack, + }), +})) + describe('EcogestureView component', () => { // eslint-disable-next-line @typescript-eslint/no-explicit-any let store: any @@ -76,7 +89,7 @@ describe('EcogestureView component', () => { mockgetAllEcogestures.mockResolvedValueOnce(ecogesturesData) const wrapper = mount( <Provider store={store}> - <EcogestureView match={{ params: { tab: '0' } }} /> + <EcogestureView /> </Provider> ) await act(async () => { @@ -98,7 +111,7 @@ describe('EcogestureView component', () => { mockgetAllEcogestures.mockResolvedValueOnce(ecogesturesData) const wrapper = mount( <Provider store={store}> - <EcogestureView match={{ params: { tab: '0' } }} /> + <EcogestureView /> </Provider> ) await act(async () => { @@ -129,7 +142,7 @@ describe('EcogestureView component', () => { mockgetAllEcogestures.mockResolvedValueOnce([]) const wrapper = mount( <Provider store={store}> - <EcogestureView match={{ params: { tab: '0' } }} /> + <EcogestureView /> </Provider> ) await act(async () => { @@ -148,7 +161,7 @@ describe('EcogestureView component', () => { mockgetAllEcogestures.mockResolvedValueOnce(ecogesturesData) const wrapper = mount( <Provider store={store}> - <EcogestureView match={{ params: { tab: '2' } }} /> + <EcogestureView /> </Provider> ) await act(async () => { diff --git a/src/components/Ecogesture/EcogestureView.tsx b/src/components/Ecogesture/EcogestureView.tsx index c147d7eaabe523f7b7d273b66f707b5ca1b40fa2..f2e6b7d9d9ca79f45a2f16ae75894d330f2f965d 100644 --- a/src/components/Ecogesture/EcogestureView.tsx +++ b/src/components/Ecogesture/EcogestureView.tsx @@ -1,5 +1,5 @@ import React, { useCallback, useEffect, useState } from 'react' -import { useClient } from 'cozy-client' +import { useClient, useQuery } from 'cozy-client' import EcogestureList from 'components/Ecogesture/EcogestureList' import CozyBar from 'components/Header/CozyBar' import Header from 'components/Header/Header' @@ -19,10 +19,7 @@ import EcogestureEmptyList from './EcogestureEmptyList' import { EcogestureStatus } from 'enum/ecogesture.enum' import EcogestureInitModal from './EcogestureInitModal' import { updateProfile } from 'store/profile/profile.actions' - -interface EcogestureViewProps { - match: { params: { tab: string } } -} +import { useHistory, useLocation } from 'react-router-dom' interface TabPanelProps { children?: React.ReactNode @@ -46,9 +43,7 @@ const TabPanel: React.FC<TabPanelProps> = ({ ) } -const EcogestureView: React.FC<EcogestureViewProps> = ({ - match, -}: EcogestureViewProps) => { +const EcogestureView: React.FC = () => { const [headerHeight, setHeaderHeight] = useState<number>(0) const defineHeaderHeight = (height: number) => { setHeaderHeight(height) @@ -56,13 +51,16 @@ const EcogestureView: React.FC<EcogestureViewProps> = ({ const { t } = useI18n() const client = useClient() const dispatch = useDispatch() + const tab = new URLSearchParams(useLocation().search).get('tab') + const profileType = useSelector((state: AppStore) => state.ecolyo.profileType) const { haveSeenEcogestureModal } = useSelector( (state: AppStore) => state.ecolyo.profile ) const [value, setValue] = useState<EcogestureStatus>( - match.params.tab ? parseInt(match.params.tab) : EcogestureStatus.ALL + tab ? parseInt(tab) : EcogestureStatus.ALL ) + const history = useHistory() const [isLoaded, setIsLoaded] = useState<boolean>(false) const [allEcogestureList, setAllEcogestureList] = useState<Ecogesture[]>([]) const [doingEcogestureList, setDoingEcogestureList] = useState<Ecogesture[]>( @@ -83,9 +81,12 @@ const EcogestureView: React.FC<EcogestureViewProps> = ({ const handleChange = useCallback( (event: React.ChangeEvent<{}>, newValue: any) => { + const params = new URLSearchParams() + params.append('tab', newValue.toString()) + history.push({ search: params.toString() }) setValue(newValue) }, - [] + [history] ) const tabProps = useCallback((index: number) => { @@ -187,10 +188,7 @@ const EcogestureView: React.FC<EcogestureViewProps> = ({ <Content height={headerHeight}> <TabPanel value={value} index={EcogestureStatus.OBJECTIVE}> {objectiveEcogestureList.length ? ( - <EcogestureList - list={objectiveEcogestureList} - currentTab={EcogestureStatus.OBJECTIVE} - /> + <EcogestureList list={objectiveEcogestureList} /> ) : ( <EcogestureEmptyList setTab={setValue} isObjective={true} /> )} @@ -198,20 +196,14 @@ const EcogestureView: React.FC<EcogestureViewProps> = ({ <TabPanel value={value} index={EcogestureStatus.DOING}> {doingEcogestureList.length ? ( - <EcogestureList - list={doingEcogestureList} - currentTab={EcogestureStatus.DOING} - /> + <EcogestureList list={doingEcogestureList} /> ) : ( <EcogestureEmptyList setTab={setValue} isObjective={false} /> )} </TabPanel> <TabPanel value={value} index={EcogestureStatus.ALL}> {allEcogestureList.length && ( - <EcogestureList - list={allEcogestureList} - currentTab={EcogestureStatus.ALL} - /> + <EcogestureList list={allEcogestureList} /> )} </TabPanel> </Content> diff --git a/src/components/Ecogesture/SingleEcogesture.tsx b/src/components/Ecogesture/SingleEcogesture.tsx index 6aaa8fdd0ead7311fe72ca13a6eb19586832d37f..96154c6c9c667603003ebb574e2bd079f663b76e 100644 --- a/src/components/Ecogesture/SingleEcogesture.tsx +++ b/src/components/Ecogesture/SingleEcogesture.tsx @@ -24,10 +24,9 @@ import { useClient } from 'cozy-client' import ErrorPage from 'components/CommonKit/ErrorPage/ErrorPage' import StyledSpinner from 'components/CommonKit/Spinner/StyledSpinner' import { FluidType } from 'enum/fluid.enum' -import { EcogestureStatus } from 'enum/ecogesture.enum' interface SingleEcogestureProps { - match: { params: { id: string; tab: EcogestureStatus } } + match: { params: { id: string } } } const SingleEcogesture: React.FC<SingleEcogestureProps> = ({ @@ -139,14 +138,12 @@ const SingleEcogesture: React.FC<SingleEcogestureProps> = ({ titleKey={ecogesture && ecogesture.shortName} isNotKey={true} displayBackArrow={true} - tab={match.params.tab} /> <Header setHeaderHeight={defineHeaderHeight} desktopTitleKey={ecogesture && ecogesture.shortName} displayBackArrow={true} isNotKey={true} - tab={match.params.tab} ></Header> <Content height={headerHeight}> <div className="single-ecogesture"> diff --git a/src/components/Ecogesture/__snapshots__/EcogestureCard.spec.tsx.snap b/src/components/Ecogesture/__snapshots__/EcogestureCard.spec.tsx.snap index 1271e8c6b0f6bdffd1d58669db8443441270b843..40c4853f746a40ff1ca2ae195515dd64628f34fc 100644 --- a/src/components/Ecogesture/__snapshots__/EcogestureCard.spec.tsx.snap +++ b/src/components/Ecogesture/__snapshots__/EcogestureCard.spec.tsx.snap @@ -87,7 +87,7 @@ exports[`EcogestureCard component should be rendered correctly 1`] = ` "render": [Function], } } - to="/ecogesture/ECOGESTURE001/1" + to="/ecogesture/ECOGESTURE001" > <ForwardRef(Link) className="ecogesture-list-item" @@ -115,7 +115,7 @@ exports[`EcogestureCard component should be rendered correctly 1`] = ` "render": [Function], } } - to="/ecogesture/ECOGESTURE001/1" + to="/ecogesture/ECOGESTURE001" > <WithStyles(ForwardRef(Typography)) className="MuiLink-root MuiLink-underlineHover ecogesture-list-item" @@ -136,7 +136,7 @@ exports[`EcogestureCard component should be rendered correctly 1`] = ` } onBlur={[Function]} onFocus={[Function]} - to="/ecogesture/ECOGESTURE001/1" + to="/ecogesture/ECOGESTURE001" variant="inherit" > <ForwardRef(Typography) @@ -192,25 +192,25 @@ exports[`EcogestureCard component should be rendered correctly 1`] = ` } onBlur={[Function]} onFocus={[Function]} - to="/ecogesture/ECOGESTURE001/1" + to="/ecogesture/ECOGESTURE001" variant="inherit" > <Link className="MuiTypography-root MuiLink-root MuiLink-underlineHover ecogesture-list-item MuiTypography-colorPrimary" onBlur={[Function]} onFocus={[Function]} - to="/ecogesture/ECOGESTURE001/1" + to="/ecogesture/ECOGESTURE001" > <LinkAnchor className="MuiTypography-root MuiLink-root MuiLink-underlineHover ecogesture-list-item MuiTypography-colorPrimary" - href="/ecogesture/ECOGESTURE001/1" + href="/ecogesture/ECOGESTURE001" navigate={[Function]} onBlur={[Function]} onFocus={[Function]} > <a className="MuiTypography-root MuiLink-root MuiLink-underlineHover ecogesture-list-item MuiTypography-colorPrimary" - href="/ecogesture/ECOGESTURE001/1" + href="/ecogesture/ECOGESTURE001" onBlur={[Function]} onClick={[Function]} onFocus={[Function]} diff --git a/src/components/Ecogesture/__snapshots__/EcogestureList.spec.tsx.snap b/src/components/Ecogesture/__snapshots__/EcogestureList.spec.tsx.snap index ef7504c7b3f29cb561f0d78b6bda79f77f5348f9..8af326e0980514a00790b7d67453932c2616e754 100644 --- a/src/components/Ecogesture/__snapshots__/EcogestureList.spec.tsx.snap +++ b/src/components/Ecogesture/__snapshots__/EcogestureList.spec.tsx.snap @@ -1832,7 +1832,6 @@ exports[`EcogesturesList component should be rendered correctly 1`] = ` className="ecogesture-content" > <mock-ecogesturecard - currentTab={2} ecogesture={ Object { "_id": "ECOGESTURE001", @@ -1868,7 +1867,6 @@ exports[`EcogesturesList component should be rendered correctly 1`] = ` key="0" /> <mock-ecogesturecard - currentTab={2} ecogesture={ Object { "_id": "ECOGESTURE002", @@ -1905,7 +1903,6 @@ exports[`EcogesturesList component should be rendered correctly 1`] = ` key="1" /> <mock-ecogesturecard - currentTab={2} ecogesture={ Object { "_id": "ECOGESTURE0013", diff --git a/src/components/Ecogesture/__snapshots__/EcogestureView.spec.tsx.snap b/src/components/Ecogesture/__snapshots__/EcogestureView.spec.tsx.snap index e566d835115005f2208b15925979b79131153081..2930dc1c918ec4f27e2aa1f5d42742e2c256952a 100644 --- a/src/components/Ecogesture/__snapshots__/EcogestureView.spec.tsx.snap +++ b/src/components/Ecogesture/__snapshots__/EcogestureView.spec.tsx.snap @@ -13,15 +13,7 @@ exports[`EcogestureView component should be rendered correctly 1`] = ` } } > - <EcogestureView - match={ - Object { - "params": Object { - "tab": "0", - }, - } - } - > + <EcogestureView> <mock-cozybar titleKey="common.title_ecogestures" /> @@ -39,7 +31,7 @@ exports[`EcogestureView component should be rendered correctly 1`] = ` centered={true} className="ecogestures-tabs" onChange={[Function]} - value={0} + value={2} > <ForwardRef(Tabs) TabIndicatorProps={ @@ -66,7 +58,7 @@ exports[`EcogestureView component should be rendered correctly 1`] = ` } } onChange={[Function]} - value={0} + value={2} > <div aria-label="ecogestures-tabs" @@ -88,7 +80,7 @@ exports[`EcogestureView component should be rendered correctly 1`] = ` > <WithStyles(ForwardRef(Tab)) aria-controls="simple-tabpanel-0" - className="single-tab active" + className="single-tab" fullWidth={false} id="simple-tab-0" indicator={false} @@ -101,13 +93,13 @@ exports[`EcogestureView component should be rendered correctly 1`] = ` </React.Fragment> } onChange={[Function]} - selected={true} + selected={false} textColor="inherit" value={0} > <ForwardRef(Tab) aria-controls="simple-tabpanel-0" - className="single-tab active" + className="single-tab" classes={ Object { "disabled": "Mui-disabled", @@ -133,14 +125,14 @@ exports[`EcogestureView component should be rendered correctly 1`] = ` </React.Fragment> } onChange={[Function]} - selected={true} + selected={false} textColor="inherit" value={0} > <WithStyles(ForwardRef(ButtonBase)) aria-controls="simple-tabpanel-0" - aria-selected={true} - className="MuiTab-root MuiTab-textColorInherit single-tab active Mui-selected" + aria-selected={false} + className="MuiTab-root MuiTab-textColorInherit single-tab" disabled={false} focusRipple={true} id="simple-tab-0" @@ -149,8 +141,8 @@ exports[`EcogestureView component should be rendered correctly 1`] = ` > <ForwardRef(ButtonBase) aria-controls="simple-tabpanel-0" - aria-selected={true} - className="MuiTab-root MuiTab-textColorInherit single-tab active Mui-selected" + aria-selected={false} + className="MuiTab-root MuiTab-textColorInherit single-tab" classes={ Object { "disabled": "Mui-disabled", @@ -166,8 +158,8 @@ exports[`EcogestureView component should be rendered correctly 1`] = ` > <button aria-controls="simple-tabpanel-0" - aria-selected={true} - className="MuiButtonBase-root MuiTab-root MuiTab-textColorInherit single-tab active Mui-selected" + aria-selected={false} + className="MuiButtonBase-root MuiTab-root MuiTab-textColorInherit single-tab" disabled={false} id="simple-tab-0" onBlur={[Function]} @@ -372,7 +364,7 @@ exports[`EcogestureView component should be rendered correctly 1`] = ` </WithStyles(ForwardRef(Tab))> <WithStyles(ForwardRef(Tab)) aria-controls="simple-tabpanel-2" - className="single-tab" + className="single-tab active" fullWidth={false} id="simple-tab-2" indicator={false} @@ -385,13 +377,13 @@ exports[`EcogestureView component should be rendered correctly 1`] = ` </React.Fragment> } onChange={[Function]} - selected={false} + selected={true} textColor="inherit" value={2} > <ForwardRef(Tab) aria-controls="simple-tabpanel-2" - className="single-tab" + className="single-tab active" classes={ Object { "disabled": "Mui-disabled", @@ -417,14 +409,14 @@ exports[`EcogestureView component should be rendered correctly 1`] = ` </React.Fragment> } onChange={[Function]} - selected={false} + selected={true} textColor="inherit" value={2} > <WithStyles(ForwardRef(ButtonBase)) aria-controls="simple-tabpanel-2" - aria-selected={false} - className="MuiTab-root MuiTab-textColorInherit single-tab" + aria-selected={true} + className="MuiTab-root MuiTab-textColorInherit single-tab active Mui-selected" disabled={false} focusRipple={true} id="simple-tab-2" @@ -433,8 +425,8 @@ exports[`EcogestureView component should be rendered correctly 1`] = ` > <ForwardRef(ButtonBase) aria-controls="simple-tabpanel-2" - aria-selected={false} - className="MuiTab-root MuiTab-textColorInherit single-tab" + aria-selected={true} + className="MuiTab-root MuiTab-textColorInherit single-tab active Mui-selected" classes={ Object { "disabled": "Mui-disabled", @@ -450,8 +442,8 @@ exports[`EcogestureView component should be rendered correctly 1`] = ` > <button aria-controls="simple-tabpanel-2" - aria-selected={false} - className="MuiButtonBase-root MuiTab-root MuiTab-textColorInherit single-tab" + aria-selected={true} + className="MuiButtonBase-root MuiTab-root MuiTab-textColorInherit single-tab active Mui-selected" disabled={false} id="simple-tab-2" onBlur={[Function]} @@ -564,11 +556,11 @@ exports[`EcogestureView component should be rendered correctly 1`] = ` > <TabPanel index={0} - value={0} + value={2} > <div aria-labelledby="simple-tab-0" - hidden={false} + hidden={true} id="simple-tabpanel-0" role="tabpanel" > @@ -902,7 +894,7 @@ exports[`EcogestureView component should be rendered correctly 1`] = ` </TabPanel> <TabPanel index={1} - value={0} + value={2} > <div aria-labelledby="simple-tab-1" @@ -1240,16 +1232,15 @@ exports[`EcogestureView component should be rendered correctly 1`] = ` </TabPanel> <TabPanel index={2} - value={0} + value={2} > <div aria-labelledby="simple-tab-2" - hidden={true} + hidden={false} id="simple-tabpanel-2" role="tabpanel" > <mock-ecogesturelist - currentTab={2} list={ Array [ Object { diff --git a/src/components/Ecogesture/__snapshots__/SingleEcogesture.spec.tsx.snap b/src/components/Ecogesture/__snapshots__/SingleEcogesture.spec.tsx.snap index de07e95011049f482003485aeb9838fd57c11551..7ff8505b761562b770f5f85ead3419df4617b0b0 100644 --- a/src/components/Ecogesture/__snapshots__/SingleEcogesture.spec.tsx.snap +++ b/src/components/Ecogesture/__snapshots__/SingleEcogesture.spec.tsx.snap @@ -26,7 +26,6 @@ exports[`SingleEcogesture component should be rendered correctly 1`] = ` <Component displayBackArrow={true} isNotKey={true} - tab={2} titleKey="Bonhomme de neige" > <div @@ -38,7 +37,6 @@ exports[`SingleEcogesture component should be rendered correctly 1`] = ` displayBackArrow={true} isNotKey={true} setHeaderHeight={[Function]} - tab={2} > <div id="Header" diff --git a/src/components/Header/CozyBar.tsx b/src/components/Header/CozyBar.tsx index ef2162849914a089c9ff441ea609d5a095429a82..fa14912e2d9559517ef9ce6ed659cce759c4aa9e 100644 --- a/src/components/Header/CozyBar.tsx +++ b/src/components/Header/CozyBar.tsx @@ -12,14 +12,12 @@ import HammerRight from 'assets/icons/ico/hammer-right.svg' import BackArrowIcon from 'assets/icons/ico/back-arrow.svg' import FeedbacksIcon from 'assets/icons/ico/feedbacks.svg' import StyledIconButton from 'components/CommonKit/IconButton/StyledIconButton' -import { EcogestureStatus } from 'enum/ecogesture.enum' interface CozyBarProps { titleKey?: string displayBackArrow?: boolean isBuilding?: boolean isNotKey?: boolean - tab?: EcogestureStatus } const CozyBar = ({ @@ -27,7 +25,6 @@ const CozyBar = ({ displayBackArrow = false, isBuilding, isNotKey, - tab, }: CozyBarProps) => { const { t } = useI18n() const history = useHistory() @@ -36,7 +33,7 @@ const CozyBar = ({ const { screenType } = useSelector((state: AppStore) => state.ecolyo.global) const handleClickBack = () => { - tab ? history.push(`/ecogestures/${tab}`) : history.goBack() + history.goBack() } const handleClickFeedbacks = () => { diff --git a/src/components/Header/Header.tsx b/src/components/Header/Header.tsx index 6c77799807f2b0e6dc2e6aca529cb5c1d806da7b..b33ca876deb8ec3fe6dbfb7cb3423aadec9c2692 100644 --- a/src/components/Header/Header.tsx +++ b/src/components/Header/Header.tsx @@ -24,7 +24,6 @@ interface HeaderProps { setHeaderHeight(height: number): void isBuilding?: boolean isNotKey?: boolean - tab?: EcogestureStatus } const Header: React.FC<HeaderProps> = ({ @@ -35,7 +34,6 @@ const Header: React.FC<HeaderProps> = ({ setHeaderHeight, isBuilding, isNotKey, - tab, }: HeaderProps) => { const { t } = useI18n() const history = useHistory() @@ -47,8 +45,8 @@ const Header: React.FC<HeaderProps> = ({ const headerBottomHeight = 8 const handleClickBack = useCallback(() => { - tab ? history.push(`/ecogestures/${tab}`) : history.goBack() - }, [history, tab]) + history.goBack() + }, [history]) const handleClickFeedbacks = () => { dispatch(updateModalIsFeedbacksOpen(true)) diff --git a/src/components/Routes/Routes.tsx b/src/components/Routes/Routes.tsx index 4bb0ae74d41dc26bf00ab385d73036f60edcca1d..2401f45d13872a34f9c04f082d6d6d3a062d8370 100644 --- a/src/components/Routes/Routes.tsx +++ b/src/components/Routes/Routes.tsx @@ -63,10 +63,8 @@ const Routes: React.FC<RouteProps> = ({ termsStatus }: RouteProps) => { <Route path={`/challenges/exploration`} component={ExplorationView} /> <Route path={`/challenges/action`} exact component={ActionView} /> <Route path={`/challenges/`} component={ChallengeView} exact /> - - <Route path="/ecogesture/:id/:tab" component={SingleEcogesture} /> <Route path="/ecogesture/:id" component={SingleEcogesture} /> - <Route path={`/ecogestures/:tab`} component={EcogestureView} /> + <Route path={`/ecogestures`} component={EcogestureView} /> <Route path={`/ecogestures`} component={EcogestureView} /> <Route path={'/options/FAQ'} component={FAQView} /> <Route path={`/options/legalnotice`} component={LegalNoticeView} />