From 2aceab6b0e7be49b569c941fd4b637e095fb7b4d Mon Sep 17 00:00:00 2001 From: smokhtari-passculture Date: Fri, 27 Sep 2024 11:07:07 +0200 Subject: [PATCH] (PC-32021)[PRO] fix: bug redirection referencement banner --- .../OfferType/CollectiveOfferType/CollectiveOfferType.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pro/src/screens/OfferType/CollectiveOfferType/CollectiveOfferType.tsx b/pro/src/screens/OfferType/CollectiveOfferType/CollectiveOfferType.tsx index d07a37a0356..0cc48b87272 100644 --- a/pro/src/screens/OfferType/CollectiveOfferType/CollectiveOfferType.tsx +++ b/pro/src/screens/OfferType/CollectiveOfferType/CollectiveOfferType.tsx @@ -1,4 +1,5 @@ import { useFormikContext } from 'formik' +import { useSelector } from 'react-redux' import { useLocation } from 'react-router-dom' import { GetOffererResponseModel } from 'apiClient/v1' @@ -14,6 +15,7 @@ import strokeBookedIcon from 'icons/stroke-booked.svg' import duplicateOfferIcon from 'icons/stroke-duplicate-offer.svg' import strokeNewOfferIcon from 'icons/stroke-new-offer.svg' import strokeTemplateOfferIcon from 'icons/stroke-template-offer.svg' +import { selectCurrentOffererId } from 'store/user/selectors' import { RadioButtonWithImage } from 'ui-kit/RadioButtonWithImage/RadioButtonWithImage' import { getLastDmsApplicationForOfferer } from 'utils/getLastCollectiveDmsApplication' @@ -29,7 +31,7 @@ export const CollectiveOfferType = ({ offerer }: CollectiveOfferTypeProps) => { const { values, handleChange } = useFormikContext() const queryParams = new URLSearchParams(location.search) - const queryOffererId = queryParams.get('structure') + const queryOffererId = useSelector(selectCurrentOffererId) const queryVenueId = queryParams.get('lieu') const lastDmsApplication = getLastDmsApplicationForOfferer(