diff --git a/src/compensations/CompensationsPreview.tsx b/src/compensations/CompensationsPreview.tsx index 131e2aaeb..7e7fb6a03 100644 --- a/src/compensations/CompensationsPreview.tsx +++ b/src/compensations/CompensationsPreview.tsx @@ -1,4 +1,5 @@ "use client"; +import { stegaClean } from "@sanity/client/stega"; import { QueryResponseInitial, useQuery } from "@sanity/react-loader"; import { Suspense } from "react"; @@ -18,7 +19,7 @@ const CompensationsPreview = ({ initialCompensations, initialLocations, }: CompensationsPreviewProps) => { - const { data } = useQuery( + const { data: compensationsData } = useQuery( COMPENSATIONS_PAGE_QUERY, { slug: initialCompensations.data.slug.current }, { initial: initialCompensations }, @@ -29,10 +30,17 @@ const CompensationsPreview = ({ { initial: initialLocations }, ); + compensationsData.salariesByLocation = stegaClean( + compensationsData.salariesByLocation, + ); + return ( locationData && ( - + ) );