From 9e0d52d9c8394bba22912dfe80e032cef985c2d0 Mon Sep 17 00:00:00 2001 From: Julien Vallini Date: Mon, 25 Apr 2022 17:07:55 +0200 Subject: [PATCH] feat: change icons --- .../components/Map/DetailsMap/DetailsMap.tsx | 4 ++-- .../ControlPanel/IconOutdoorRoute.tsx | 23 +++++++++++++++++++ .../ControlPanel/IconOutdoorSite.tsx | 22 ++++++++++++++++++ .../ControlSection/ControlPanel/index.tsx | 6 +++-- .../DetailsReservationWidget.tsx | 12 ++++++---- 5 files changed, 58 insertions(+), 9 deletions(-) create mode 100644 frontend/src/components/Map/components/ControlSection/ControlPanel/IconOutdoorRoute.tsx create mode 100644 frontend/src/components/Map/components/ControlSection/ControlPanel/IconOutdoorSite.tsx diff --git a/frontend/src/components/Map/DetailsMap/DetailsMap.tsx b/frontend/src/components/Map/DetailsMap/DetailsMap.tsx index bcaa16f5a..98bff425e 100644 --- a/frontend/src/components/Map/DetailsMap/DetailsMap.tsx +++ b/frontend/src/components/Map/DetailsMap/DetailsMap.tsx @@ -187,8 +187,8 @@ export const DetailsMap: React.FC = props => { ? informationDeskMobileVisibility : null } - coursesVisibility={coursesVisibility} - experiencesVisibility={experiencesVisibility} + coursesVisibility={props.courses ? coursesVisibility : null} + experiencesVisibility={props.experiences ? experiencesVisibility : null} toggleTrekChildrenVisibility={toggleTrekChildrenVisibility} togglePoiVisibility={togglePoiVisibility} toggleReferencePointsVisibility={toggleReferencePointsVisibility} diff --git a/frontend/src/components/Map/components/ControlSection/ControlPanel/IconOutdoorRoute.tsx b/frontend/src/components/Map/components/ControlSection/ControlPanel/IconOutdoorRoute.tsx new file mode 100644 index 000000000..84b35cded --- /dev/null +++ b/frontend/src/components/Map/components/ControlSection/ControlPanel/IconOutdoorRoute.tsx @@ -0,0 +1,23 @@ +import * as React from 'react'; +import { SVGProps } from 'react'; + +const SvgComponent = (props: SVGProps) => ( + + + +); + +export default SvgComponent; diff --git a/frontend/src/components/Map/components/ControlSection/ControlPanel/IconOutdoorSite.tsx b/frontend/src/components/Map/components/ControlSection/ControlPanel/IconOutdoorSite.tsx new file mode 100644 index 000000000..d87598d7c --- /dev/null +++ b/frontend/src/components/Map/components/ControlSection/ControlPanel/IconOutdoorSite.tsx @@ -0,0 +1,22 @@ +import * as React from 'react'; +import { SVGProps } from 'react'; + +const SvgComponent = (props: SVGProps) => ( + + + +); + +export default SvgComponent; diff --git a/frontend/src/components/Map/components/ControlSection/ControlPanel/index.tsx b/frontend/src/components/Map/components/ControlSection/ControlPanel/index.tsx index 97c8b91e0..e8f7ff51a 100644 --- a/frontend/src/components/Map/components/ControlSection/ControlPanel/index.tsx +++ b/frontend/src/components/Map/components/ControlSection/ControlPanel/index.tsx @@ -5,6 +5,8 @@ import IconLocation from './IconLocation'; import IconInfo from './IconInfo'; import IconDrapeau from './IconDrapeau'; import IconPatrimoine from './IconPatrimoine'; +import IconOutdoorSite from './IconOutdoorSite'; +import IconOutdoorRoute from './IconOutdoorRoute'; import { ControlSectionProps } from '../ControlSection'; const Wrapper = styled.div` @@ -85,7 +87,7 @@ export const ControlPanel: React.FC = ({ )} {coursesVisibility !== null && ( = ({ )} {experiencesVisibility !== null && ( = }; // eslint-disable-next-line - waitForGlobal('eitinerance').then(() => { - const spaClient = ITW.pages.getSinglePageApplicationClient({ layer }); - AllianceReseaux.jQuery(function () { - spaClient.executePage(); + waitForGlobal('eitinerance') + .then(() => waitForGlobal('AllianceReseaux')) + .then(() => { + const spaClient = ITW.pages.getSinglePageApplicationClient({ layer }); + AllianceReseaux.jQuery(function () { + spaClient.executePage(); + }); }); - }); })(window, (window as any)?.eitinerance?.core); }, []);