Repository: pass-culture/pass-culture-app-native
Pull request #7790: (PC-35888) refactor(Venue): move query files
Author: login: xlecunff-pass
Created: 2025-03-05T14:32:14Z | Merged: 2025-04-29T13:47:06Z



Diff:
diff --git a/src/cheatcodes/pages/others/CheatcodesScreenAccesLibre.tsx b/src/cheatcodes/pages/others/CheatcodesScreenAccesLibre.tsx
index 551f689f0097..5ac1c998d486 100644
--- a/src/cheatcodes/pages/others/CheatcodesScreenAccesLibre.tsx
+++ b/src/cheatcodes/pages/others/CheatcodesScreenAccesLibre.tsx
@@ -3,7 +3,7 @@ import { View } from 'react-native'
 import styled from 'styled-components/native'
 
 import { CheatcodesTemplateScreen } from 'cheatcodes/components/CheatcodesTemplateScreen'
-import { useVenue } from 'features/venue/api/useVenue'
+import { useVenueQuery } from 'features/venue/queries/useVenueQuery'
 import { getDetailedAccessibilityInfo } from 'shared/accessibility/getDetailedAccessibilityInfo'
 import { ButtonPrimary } from 'ui/components/buttons/ButtonPrimary'
 import { TextInput } from 'ui/components/inputs/TextInput'
@@ -16,12 +16,16 @@ import { ColorsEnum } from 'ui/theme/colors'
 export const CheatcodesScreenAccesLibre = () => {
   const [value, setValue] = useState('')
   const [venueId, setVenueId] = useState<number | null>(null)
-  const { data: venue } = useVenue(venueId)
+
+  const { data: venue } = useVenueQuery(venueId || 0, { enabled: !!venueId })
 
   const details = getDetailedAccessibilityInfo(venue?.externalAccessibilityData)
 
   const onPress = () => {
-    setVenueId(parseInt(value))
+    const parsedId = parseInt(value, 10)
+    if (!isNaN(parsedId)) {
+      setVenueId(parsedId)
+    }
   }
 
   return (
diff --git a/src/features/search/components/SearchResultsContent/SearchResultsContent.web.test.tsx b/src/features/search/components/SearchResultsContent/SearchResultsContent.web.test.tsx
index 0b0e20aac511..02088c4e1d31 100644
--- a/src/features/search/components/SearchResultsContent/SearchResultsContent.web.test.tsx
+++ b/src/features/search/components/SearchResultsContent/SearchResultsContent.web.test.tsx
@@ -73,7 +73,7 @@ jest.mock('features/location/helpers/useLocationState', () => ({
 jest.mock('features/venueMap/hook/useCenterOnLocation')
 const mockUseCenterOnLocation = useCenterOnLocation as jest.Mock
 
-jest.mock('features/venue/api/useVenueOffers')
+jest.mock('queries/venue/useVenueOffersQuery')
 jest.mock('features/venueMap/helpers/zoomOutIfMapEmpty')
 jest.mock('ui/theme/customFocusOutline/customFocusOutline')
 
diff --git a/src/features/search/pages/SearchResults/SearchResults.web.test.tsx b/src/features/search/pages/SearchResults/SearchResults.web.test.tsx
index 862d1436dd95..f75c9d54ae02 100644
--- a/src/features/search/pages/SearchResults/SearchResults.web.test.tsx
+++ b/src/features/search/pages/SearchResults/SearchResults.web.test.tsx
@@ -67,7 +67,7 @@ jest.mock('libs/firebase/remoteConfig/remoteConfig.services')
 jest.mock('features/venueMap/hook/useCenterOnLocation')
 const mockUseCenterOnLocation = useCenterOnLocation as jest.Mock
 
-jest.mock('features/venue/api/useVenueOffers')
+jest.mock('queries/venue/useVenueOffersQuery')
 jest.mock('features/venueMap/helpers/zoomOutIfMapEmpty')
 jest.mock('features/navigation/TabBar/tabBarRoutes')
 
diff --git a/src/features/venue/api/__mocks__/useVenue.ts b/src/features/venue/api/__mocks__/useVenue.ts
deleted file mode 100644
index c1b6bfcc66da..000000000000
--- a/src/features/venue/api/__mocks__/useVenue.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import { venueDataTest } from 'features/venue/fixtures/venueDataTest'
-
-export const useVenue = jest.fn().mockReturnValue({ data: venueDataTest })
diff --git a/src/features/venue/api/useVenue.ts b/src/features/venue/api/useVenue.ts
deleted file mode 100644
index 3d10b2cc4e88..000000000000
--- a/src/features/venue/api/useVenue.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-import { useQuery } from 'react-query'
-
-import { api } from 'api/api'
-import { VenueResponse } from 'api/gen'
-import { VenueNotFound } from 'features/venue/pages/VenueNotFound/VenueNotFound'
-import { useLogTypeFromRemoteConfig } from 'libs/hooks/useLogTypeFromRemoteConfig'
-import { LogTypeEnum, VenueNotFoundError } from 'libs/monitoring/errors'
-import { QueryKeys } from 'libs/queryKeys'
-
-const getVenueById = async (venueId: number | null, logType: LogTypeEnum) => {
-  if (typeof venueId !== 'number') return
-  try {
-    return await api.getNativeV1VenuevenueId(venueId)
-  } catch (error) {
-    throw new VenueNotFoundError(venueId, {
-      Screen: VenueNotFound,
-      logType,
-    })
-  }
-}
-
-export const useVenue = (venueId: number | null) => {
-  const { logType } = useLogTypeFromRemoteConfig()
-
-  return useQuery<VenueResponse | undefined>(
-    [QueryKeys.VENUE, venueId],
-    () => getVenueById(venueId, logType),
-    {
-      enabled: typeof venueId === 'number',
-    }
-  )
-}
diff --git a/src/features/venue/components/VenueBody/VenueBody.native.test.tsx b/src/features/venue/components/VenueBody/VenueBody.native.test.tsx
index 37d1eeda661e..67936cc65cb8 100644
--- a/src/features/venue/components/VenueBody/VenueBody.native.test.tsx
+++ b/src/features/venue/components/VenueBody/VenueBody.native.test.tsx
@@ -8,7 +8,6 @@ import { gtlPlaylistAlgoliaSnapshot } from 'features/gtlPlaylist/fixtures/gtlPla
 import * as useGTLPlaylists from 'features/gtlPlaylist/hooks/useGTLPlaylists'
 import { GtlPlaylistData } from 'features/gtlPlaylist/types'
 import { HeadlineOfferData } from 'features/headlineOffer/type'
-import { useVenueOffers } from 'features/venue/api/useVenueOffers'
 import { VenueBody } from 'features/venue/components/VenueBody/VenueBody'
 import { venueDataTest } from 'features/venue/fixtures/venueDataTest'
 import { VenueOffersResponseSnap } from 'features/venue/fixtures/venueOffersResponseSnap'
@@ -16,6 +15,7 @@ import * as useVenueSearchParameters from 'features/venue/helpers/useVenueSearch
 import mockVenueSearchParams from 'fixtures/venueSearchParams'
 import { analytics } from 'libs/analytics/provider'
 import { setFeatureFlags } from 'libs/firebase/firestore/featureFlags/__tests__/setFeatureFlags'
+import { useVenueOffersQuery } from 'queries/venue/useVenueOffersQuery'
 import { reactQueryProviderHOC } from 'tests/reactQueryProviderHOC'
 import { render, screen, userEvent } from 'tests/utils'
 
@@ -26,8 +26,8 @@ jest
   .spyOn(useGTLPlaylists, 'useGTLPlaylists')
   .mockReturnValue({ isLoading: false, gtlPlaylists: gtlPlaylistAlgoliaSnapshot })
 
-jest.mock('features/venue/api/useVenueOffers')
-const mockUseVenueOffers = useVenueOffers as jest.Mock
+jest.mock('queries/venue/useVenueOffersQuery')
+const mockUseVenueOffers = useVenueOffersQuery as jest.Mock
 mockUseVenueOffers.mockReturnValue({
   isLoading: false,
   data: { hits: VenueOffersResponseSnap, nbHits: 10 },
diff --git a/src/features/venue/components/VenueContent/VenueContent.native.test.tsx b/src/features/venue/components/VenueContent/VenueContent.native.test.tsx
index 5708c47af600..397ce6850333 100644
--- a/src/features/venue/components/VenueContent/VenueContent.native.test.tsx
+++ b/src/features/venue/components/VenueContent/VenueContent.native.test.tsx
@@ -26,8 +26,8 @@ jest.unmock('react-native/Libraries/Animated/createAnimatedComponent')
 jest.mock('features/gtlPlaylist/hooks/useGTLPlaylists', () => ({
   useGTLPlaylists: () => ({ isLoading: false }),
 }))
-jest.mock('features/venue/api/useVenueOffers', () => ({
-  useVenueOffers: () => ({ isLoading: false }),
+jest.mock('queries/venue/useVenueOffersQuery', () => ({
+  useVenueOffersQuery: () => ({ isLoading: false }),
 }))
 
 jest.mock('libs/subcategories/useSubcategories')
diff --git a/src/features/venue/components/VenueHeader/VenueHeader.native.test.tsx b/src/features/venue/components/VenueHeader/VenueHeader.native.test.tsx
index ed1c936d423a..a0b6ad8f7055 100644
--- a/src/features/venue/components/VenueHeader/VenueHeader.native.test.tsx
+++ b/src/features/venue/components/VenueHeader/VenueHeader.native.test.tsx
@@ -9,7 +9,7 @@ import { reactQueryProviderHOC } from 'tests/reactQueryProviderHOC'
 import { act, render, screen, userEvent } from 'tests/utils'
 
 jest.unmock('react-native/Libraries/Animated/createAnimatedComponent')
-jest.mock('features/venue/api/useVenue')
+jest.mock('features/venue/queries/useVenueQuery')
 jest.useFakeTimers()
 
 jest.spyOn(Share, 'share').mockResolvedValue({ action: Share.sharedAction })
diff --git a/src/features/venue/components/VenueOffers/VenueOffers.native.test.tsx b/src/features/venue/components/VenueOffers/VenueOffers.native.test.tsx
index 4ebaa0bfda75..0795a628961c 100644
--- a/src/features/venue/components/VenueOffers/VenueOffers.native.test.tsx
+++ b/src/features/venue/components/VenueOffers/VenueOffers.native.test.tsx
@@ -8,7 +8,6 @@ import { gtlPlaylistAlgoliaSnapshot } from 'features/gtlPlaylist/fixtures/gtlPla
 import { mockLabelMapping, mockMapping } from 'features/headlineOffer/fixtures/mockMapping'
 import { OfferCTAProvider } from 'features/offer/components/OfferContent/OfferCTAProvider'
 import { initialSearchState } from 'features/search/context/reducer'
-import * as useVenueOffers from 'features/venue/api/useVenueOffers'
 import { VenueOffers } from 'features/venue/components/VenueOffers/VenueOffers'
 import { venueDataTest } from 'features/venue/fixtures/venueDataTest'
 import { VenueOffersArtistsResponseSnap } from 'features/venue/fixtures/venueOffersArtistsResponseSnap'
@@ -21,6 +20,7 @@ import { analytics } from 'libs/analytics/provider'
 import { setFeatureFlags } from 'libs/firebase/firestore/featureFlags/__tests__/setFeatureFlags'
 import { RemoteStoreFeatureFlags } from 'libs/firebase/firestore/types'
 import { LocationMode } from 'libs/location/types'
+import * as useVenueOffersQueryAPI from 'queries/venue/useVenueOffersQuery'
 import { Currency } from 'shared/currency/useGetCurrencyToDisplay'
 import { reactQueryProviderHOC } from 'tests/reactQueryProviderHOC'
 import { render, screen, userEvent } from 'tests/utils'
@@ -28,7 +28,7 @@ import { AnchorProvider } from 'ui/components/anchor/AnchorContext'
 
 const venueId = venueDataTest.id
 
-jest.spyOn(useVenueOffers, 'useVenueOffers').mockReturnValue({
+jest.spyOn(useVenueOffersQueryAPI, 'useVenueOffersQuery').mockReturnValue({
   isLoading: false,
   data: { hits: VenueOffersResponseSnap, nbHits: 10 },
 } as unknown as UseQueryResult<VenueOffersType, unknown>)
@@ -99,7 +99,7 @@ describe('<VenueOffers />', () => {
   })
 
   it('should display skeleton if offers are fetching', () => {
-    jest.spyOn(useVenueOffers, 'useVenueOffers').mockReturnValueOnce({
+    jest.spyOn(useVenueOffersQueryAPI, 'useVenueOffersQuery').mockReturnValueOnce({
       isLoading: true,
     } as UseQueryResult<VenueOffersType, unknown>)
     renderVenueOffers({})
diff --git a/src/features/venue/components/VenueOffers/VenueOffers.tsx b/src/features/venue/components/VenueOffers/VenueOffers.tsx
index fd312b3d9cbb..57c6c7dedcf3 100644
--- a/src/features/venue/components/VenueOffers/VenueOffers.tsx
+++ b/src/features/venue/components/VenueOffers/VenueOffers.tsx
@@ -4,7 +4,6 @@ import { SubcategoryIdEnum, VenueResponse } from 'api/gen'
 import { GtlPlaylistData } from 'features/gtlPlaylist/types'
 import { useIsUserUnderage } from 'features/profile/helpers/useIsUserUnderage'
 import { useSearch } from 'features/search/context/SearchWrapper'
-import { useVenueOffers } from 'features/venue/api/useVenueOffers'
 import { NoOfferPlaceholder } from 'features/venue/components/Placeholders/NoOfferPlaceholder'
 import { VenueMovies } from 'features/venue/components/VenueOffers/VenueMovies'
 import { VenueOffersList } from 'features/venue/components/VenueOffers/VenueOffersList'
@@ -13,6 +12,7 @@ import type { VenueOffers, VenueOffersArtists } from 'features/venue/types'
 import { useTransformOfferHits } from 'libs/algolia/fetchAlgolia/transformOfferHit'
 import { useLocation } from 'libs/location'
 import { CategoryHomeLabelMapping, CategoryIdMapping } from 'libs/subcategories/types'
+import { useVenueOffersQuery } from 'queries/venue/useVenueOffersQuery'
 import { Currency } from 'shared/currency/useGetCurrencyToDisplay'
 import { OfferPlaylistSkeleton, TileSize } from 'ui/components/placeholders/OfferPlaylistSkeleton'
 import { Spacer } from 'ui/theme'
@@ -52,7 +52,7 @@ export function VenueOffers({
   const venueSearchParams = useVenueSearchParameters(venue)
   const { searchState } = useSearch()
   const isUserUnderage = useIsUserUnderage()
-  const { isLoading: areVenueOffersLoading } = useVenueOffers({
+  const { isLoading: areVenueOffersLoading } = useVenueOffersQuery({
     userLocation,
     selectedLocationMode,
     isUserUnderage,
diff --git a/src/features/venue/helpers/useVenueSearchParameters.native.test.ts b/src/features/venue/helpers/useVenueSearchParameters.native.test.ts
index 34a35066043a..7d86e0ef0556 100644
--- a/src/features/venue/helpers/useVenueSearchParameters.native.test.ts
+++ b/src/features/venue/helpers/useVenueSearchParameters.native.test.ts
@@ -12,8 +12,8 @@ jest.mock('features/search/context/SearchWrapper', () => ({
 
 const mockVenue: VenueResponse = venueDataTest
 
-jest.mock('features/venue/api/useVenue', () => ({
-  useVenue: jest.fn((venueId) => ({ data: venueId === mockVenue.id ? mockVenue : undefined })),
+jest.mock('features/venue/queries/useVenueQuery', () => ({
+  useVenueQuery: jest.fn((venueId) => ({ data: venueId === mockVenue.id ? mockVenue : undefined })),
 }))
 jest.mock('features/search/helpers/useMaxPrice/useMaxPrice', () => ({
   useMaxPrice: jest.fn(() => 300_00),
diff --git a/src/features/venue/api/useVenueOffersArtists/useVenueOffersArtists.test.ts b/src/features/venue/hooks/useVenueOffersArtists/useVenueOffersArtists.test.ts
similarity index 98%
rename from src/features/venue/api/useVenueOffersArtists/useVenueOffersArtists.test.ts
rename to src/features/venue/hooks/useVenueOffersArtists/useVenueOffersArtists.test.ts
index 5a613e687009..33726be666ad 100644
--- a/src/features/venue/api/useVenueOffersArtists/useVenueOffersArtists.test.ts
+++ b/src/features/venue/hooks/useVenueOffersArtists/useVenueOffersArtists.test.ts
@@ -1,7 +1,7 @@
 import { shuffle } from 'lodash'
 
 import { SubcategoryIdEnum } from 'api/gen'
-import { useVenueOffersArtists } from 'features/venue/api/useVenueOffersArtists/useVenueOffersArtists'
+import { useVenueOffersArtists } from 'features/venue/hooks/useVenueOffersArtists/useVenueOffersArtists'
 import { Offer } from 'shared/offer/types'
 import { reactQueryProviderHOC } from 'tests/reactQueryProviderHOC'
 import { renderHook, waitFor } from 'tests/utils'
diff --git a/src/features/venue/api/useVenueOffersArtists/useVenueOffersArtists.ts b/src/features/venue/hooks/useVenueOffersArtists/useVenueOffersArtists.ts
similarity index 100%
rename from src/features/venue/api/useVenueOffersArtists/useVenueOffersArtists.ts
rename to src/features/venue/hooks/useVenueOffersArtists/useVenueOffersArtists.ts
diff --git a/src/features/venue/pages/Venue/Venue.native.test.tsx b/src/features/venue/pages/Venue/Venue.native.test.tsx
index 515e006305d2..df66b7c35970 100644
--- a/src/features/venue/pages/Venue/Venue.native.test.tsx
+++ b/src/features/venue/pages/Venue/Venue.native.test.tsx
@@ -15,7 +15,6 @@ import { useGTLPlaylists } from 'features/gtlPlaylist/hooks/useGTLPlaylists'
 import { Referrals } from 'features/navigation/RootNavigator/types'
 import { CineContentCTAID } from 'features/offer/components/OfferCine/CineContentCTA'
 import * as useOfferCTAContextModule from 'features/offer/components/OfferContent/OfferCTAProvider'
-import { useVenueOffers } from 'features/venue/api/useVenueOffers'
 import { venueDataTest } from 'features/venue/fixtures/venueDataTest'
 import {
   VenueMoviesOffersResponseSnap,
@@ -28,6 +27,7 @@ import { RemoteStoreFeatureFlags } from 'libs/firebase/firestore/types'
 import * as useRemoteConfigQuery from 'libs/firebase/remoteConfig/queries/useRemoteConfigQuery'
 import { DEFAULT_REMOTE_CONFIG } from 'libs/firebase/remoteConfig/remoteConfig.constants'
 import { Network } from 'libs/share/types'
+import { useVenueOffersQuery } from 'queries/venue/useVenueOffersQuery'
 import { Offer } from 'shared/offer/types'
 import { mockServer } from 'tests/mswServer'
 import { reactQueryProviderHOC } from 'tests/reactQueryProviderHOC'
@@ -45,8 +45,8 @@ jest.mock('libs/firebase/analytics/analytics')
 jest.unmock('react-native/Libraries/Animated/createAnimatedComponent')
 
 jest.mock('libs/itinerary/useItinerary')
-jest.mock('features/venue/api/useVenueOffers')
-const mockUseVenueOffers = useVenueOffers as jest.Mock
+jest.mock('queries/venue/useVenueOffersQuery')
+const mockUseVenueOffers = useVenueOffersQuery as jest.Mock
 
 jest.mock('features/search/context/SearchWrapper')
 jest.mock('libs/location')
diff --git a/src/features/venue/pages/Venue/Venue.tsx b/src/features/venue/pages/Venue/Venue.tsx
index 622748da01d7..151c5c0da5d2 100644
--- a/src/features/venue/pages/Venue/Venue.tsx
+++ b/src/features/venue/pages/Venue/Venue.tsx
@@ -10,9 +10,6 @@ import { UseRouteType } from 'features/navigation/RootNavigator/types'
 import { OfferCTAProvider } from 'features/offer/components/OfferContent/OfferCTAProvider'
 import { useIsUserUnderage } from 'features/profile/helpers/useIsUserUnderage'
 import { useSearch } from 'features/search/context/SearchWrapper'
-import { useVenue } from 'features/venue/api/useVenue'
-import { useVenueOffers } from 'features/venue/api/useVenueOffers'
-import { useVenueOffersArtists } from 'features/venue/api/useVenueOffersArtists/useVenueOffersArtists'
 import { VenueBody } from 'features/venue/components/VenueBody/VenueBody'
 import { VenueContent } from 'features/venue/components/VenueContent/VenueContent'
 import { VENUE_CTA_HEIGHT_IN_SPACES } from 'features/venue/components/VenueCTA/VenueCTA'
@@ -20,6 +17,8 @@ import { VenueMessagingApps } from 'features/venue/components/VenueMessagingApps
 import { VenueThematicSection } from 'features/venue/components/VenueThematicSection/VenueThematicSection'
 import { VenueTopComponent } from 'features/venue/components/VenueTopComponent/VenueTopComponent'
 import { useVenueSearchParameters } from 'features/venue/helpers/useVenueSearchParameters'
+import { useVenueOffersArtists } from 'features/venue/hooks/useVenueOffersArtists/useVenueOffersArtists'
+import { useVenueQuery } from 'features/venue/queries/useVenueQuery'
 import { useTransformOfferHits } from 'libs/algolia/fetchAlgolia/transformOfferHit'
 import { analytics } from 'libs/analytics/provider'
 import { useFeatureFlag } from 'libs/firebase/firestore/featureFlags/useFeatureFlag'
@@ -27,6 +26,7 @@ import { RemoteStoreFeatureFlags } from 'libs/firebase/firestore/types'
 import { useRemoteConfigQuery } from 'libs/firebase/remoteConfig/queries/useRemoteConfigQuery'
 import { useLocation } from 'libs/location'
 import { useCategoryHomeLabelMapping, useCategoryIdMapping } from 'libs/subcategories'
+import { useVenueOffersQuery } from 'queries/venue/useVenueOffersQuery'
 import { useGetCurrencyToDisplay } from 'shared/currency/useGetCurrencyToDisplay'
 import { useGetPacificFrancToEuroRate } from 'shared/exchangeRates/useGetPacificFrancToEuroRate'
 import { SectionWithDivider } from 'ui/components/SectionWithDivider'
@@ -35,7 +35,7 @@ import { getSpacing } from 'ui/theme'
 
 export const Venue: FunctionComponent = () => {
   const { params } = useRoute<UseRouteType<'Venue'>>()
-  const { data: venue } = useVenue(params.id)
+  const { data: venue } = useVenueQuery(params.id)
   const { gtlPlaylists, isLoading: arePlaylistsLoading } = useGTLPlaylists({
     venue,
     searchGroupLabel: params?.fromThematicSearch,
@@ -46,7 +46,7 @@ export const Venue: FunctionComponent = () => {
   const venueSearchParams = useVenueSearchParameters(venue)
   const { searchState } = useSearch()
   const isUserUnderage = useIsUserUnderage()
-  const { data: venueOffers } = useVenueOffers({
+  const { data: venueOffers } = useVenueOffersQuery({
     userLocation,
     selectedLocationMode,
     isUserUnderage,
diff --git a/src/features/venue/pages/Venue/Venue.web.test.tsx b/src/features/venue/pages/Venue/Venue.web.test.tsx
index 89f51dc0d875..f1c498dac366 100644
--- a/src/features/venue/pages/Venue/Venue.web.test.tsx
+++ b/src/features/venue/pages/Venue/Venue.web.test.tsx
@@ -19,8 +19,8 @@ import { act, checkAccessibilityFor, fireEvent, render, screen } from 'tests/uti
 mockdate.set(new Date('2021-08-15T00:00:00Z'))
 
 jest.mock('libs/subcategories/useSubcategory')
-jest.mock('features/venue/api/useVenue')
-jest.mock('features/venue/api/useVenueOffers')
+jest.mock('features/venue/queries/useVenueQuery')
+jest.mock('queries/venue/useVenueOffersQuery')
 jest.mock('libs/itinerary/useItinerary')
 
 jest.mock('features/auth/context/AuthContext')
diff --git a/src/features/venue/pages/VenuePreviewCarousel/VenuePreviewCarousel.native.test.tsx b/src/features/venue/pages/VenuePreviewCarousel/VenuePreviewCarousel.native.test.tsx
index 770cc133fe93..3dbd6c7ff322 100644
--- a/src/features/venue/pages/VenuePreviewCarousel/VenuePreviewCarousel.native.test.tsx
+++ b/src/features/venue/pages/VenuePreviewCarousel/VenuePreviewCarousel.native.test.tsx
@@ -10,8 +10,8 @@ const mockUseVenue = jest.fn((): { data: VenueResponse } => ({
   data: mockVenueResponse,
 }))
 
-jest.mock('features/venue/api/useVenue', () => ({
-  useVenue: () => mockUseVenue(),
+jest.mock('features/venue/queries/useVenueQuery', () => ({
+  useVenueQuery: () => mockUseVenue(),
 }))
 
 describe('VenuePreviewCarousel', () => {
diff --git a/src/features/venue/pages/VenuePreviewCarousel/VenuePreviewCarousel.tsx b/src/features/venue/pages/VenuePreviewCarousel/VenuePreviewCarousel.tsx
index 18d2f4b62455..672cc09a7900 100644
--- a/src/features/venue/pages/VenuePreviewCarousel/VenuePreviewCarousel.tsx
+++ b/src/features/venue/pages/VenuePreviewCarousel/VenuePreviewCarousel.tsx
@@ -3,13 +3,13 @@ import React, { FunctionComponent } from 'react'
 
 import { UseRouteType } from 'features/navigation/RootNavigator/types'
 import { useGoBack } from 'features/navigation/useGoBack'
-import { useVenue } from 'features/venue/api/useVenue'
+import { useVenueQuery } from 'features/venue/queries/useVenueQuery'
 import { ImagesCarousel } from 'ui/components/ImagesCarousel/ImagesCarousel'
 
 export const VenuePreviewCarousel: FunctionComponent = () => {
   const { params } = useRoute<UseRouteType<'VenuePreviewCarousel'>>()
   const { goBack } = useGoBack('Venue', { id: params.id })
-  const { data: venue } = useVenue(params.id)
+  const { data: venue } = useVenueQuery(params.id)
 
   const defaultIndex = params.defaultIndex ?? 0
 
diff --git a/src/features/venue/queries/__mocks__/useVenueQuery.ts b/src/features/venue/queries/__mocks__/useVenueQuery.ts
new file mode 100644
index 000000000000..9f2e64033845
--- /dev/null
+++ b/src/features/venue/queries/__mocks__/useVenueQuery.ts
@@ -0,0 +1,3 @@
+import { venueDataTest } from 'features/venue/fixtures/venueDataTest'
+
+export const useVenueQuery = jest.fn().mockReturnValue({ data: venueDataTest })
diff --git a/src/features/venue/queries/useVenueQuery.ts b/src/features/venue/queries/useVenueQuery.ts
new file mode 100644
index 000000000000..fded76c6ebc3
--- /dev/null
+++ b/src/features/venue/queries/useVenueQuery.ts
@@ -0,0 +1,26 @@
+import { useQuery } from 'react-query'
+
+import { api } from 'api/api'
+import { VenueResponse } from 'api/gen'
+import { VenueNotFound } from 'features/venue/pages/VenueNotFound/VenueNotFound'
+import { useLogTypeFromRemoteConfig } from 'libs/hooks/useLogTypeFromRemoteConfig'
+import { VenueNotFoundError } from 'libs/monitoring/errors'
+import { QueryKeys } from 'libs/queryKeys'
+
+export const useVenueQuery = (venueId: number, options?: { enabled?: boolean }) => {
+  const { logType } = useLogTypeFromRemoteConfig()
+
+  return useQuery<VenueResponse | undefined>(
+    [QueryKeys.VENUE, venueId],
+    () => api.getNativeV1VenuevenueId(venueId),
+    {
+      onError: (_error) => {
+        throw new VenueNotFoundError(venueId, {
+          Screen: VenueNotFound,
+          logType,
+        })
+      },
+      enabled: options?.enabled ?? true,
+    }
+  )
+}
diff --git a/src/features/venueMap/components/VenueMapView/VenueMapViewContainer.native.test.tsx b/src/features/venueMap/components/VenueMapView/VenueMapViewContainer.native.test.tsx
index 88105007502d..744fa960ad40 100644
--- a/src/features/venueMap/components/VenueMapView/VenueMapViewContainer.native.test.tsx
+++ b/src/features/venueMap/components/VenueMapView/VenueMapViewContainer.native.test.tsx
@@ -7,7 +7,6 @@ import { UseQueryResult } from 'react-query'
 import { ReactTestInstance } from 'react-test-renderer'
 
 import { PlaylistType } from 'features/offer/enums'
-import * as useVenueOffers from 'features/venue/api/useVenueOffers'
 import { VenueOffersResponseSnap } from 'features/venue/fixtures/venueOffersResponseSnap'
 import * as useVenueSearchParameters from 'features/venue/helpers/useVenueSearchParameters'
 import { VenueOffers } from 'features/venue/types'
@@ -20,6 +19,7 @@ import mockVenueSearchParams from 'fixtures/venueSearchParams'
 import { venuesFixture } from 'libs/algolia/fetchAlgolia/fetchVenues/fixtures/venuesFixture'
 import { setFeatureFlags } from 'libs/firebase/firestore/featureFlags/__tests__/setFeatureFlags'
 import { RemoteStoreFeatureFlags } from 'libs/firebase/firestore/types'
+import * as useVenueOffersQueryAPI from 'queries/venue/useVenueOffersQuery'
 import { useVenuesInRegionQuery } from 'queries/venueMap/useVenuesInRegionQuery'
 import { reactQueryProviderHOC } from 'tests/reactQueryProviderHOC'
 import { act, fireEvent, render, screen, userEvent, waitFor } from 'tests/utils'
@@ -44,7 +44,7 @@ const mockUseCenterOnLocation = useCenterOnLocation as jest.Mock
 
 jest.mock('features/venueMap/helpers/zoomOutIfMapEmpty')
 
-const useVenueOffersSpy = jest.spyOn(useVenueOffers, 'useVenueOffers')
+const useVenueOffersSpy = jest.spyOn(useVenueOffersQueryAPI, 'useVenueOffersQuery')
 
 const useVenueMapFiltersSpy = jest.spyOn(useVenueMapFilters, 'useVenueMapFilters')
 useVenueMapFiltersSpy.mockReturnValue({
diff --git a/src/features/venueMap/components/VenueMapView/VenueMapViewContainer.tsx b/src/features/venueMap/components/VenueMapView/VenueMapViewContainer.tsx
index 9515674bf560..ae8fd10604a0 100644
--- a/src/features/venueMap/components/VenueMapView/VenueMapViewContainer.tsx
+++ b/src/features/venueMap/components/VenueMapView/VenueMapViewContainer.tsx
@@ -17,7 +17,6 @@ import styled from 'styled-components/native'
 import { Referrals, UseNavigationType } from 'features/navigation/RootNavigator/types'
 import { useIsUserUnderage } from 'features/profile/helpers/useIsUserUnderage'
 import { useSearch } from 'features/search/context/SearchWrapper'
-import { useVenueOffers } from 'features/venue/api/useVenueOffers'
 import { useVenueSearchParameters } from 'features/venue/helpers/useVenueSearchParameters'
 import { VenueMapBottomSheet } from 'features/venueMap/components/VenueMapBottomSheet/VenueMapBottomSheet'
 import { transformGeoLocatedVenueToVenueResponse } from 'features/venueMap/helpers/geoLocatedVenueToVenueResponse/geoLocatedVenueToVenueResponse'
@@ -39,6 +38,7 @@ import { useFeatureFlag } from 'libs/firebase/firestore/featureFlags/useFeatureF
 import { RemoteStoreFeatureFlags } from 'libs/firebase/firestore/types'
 import { useLocation } from 'libs/location'
 import { Map, MarkerPressEvent, Region } from 'libs/maps/maps'
+import { useVenueOffersQuery } from 'queries/venue/useVenueOffersQuery'
 import { LENGTH_L } from 'ui/theme'
 
 import { VenueMapView } from './VenueMapView'
@@ -89,7 +89,7 @@ export const VenueMapViewContainer: FunctionComponent = () => {
   const venueSearchParams = useVenueSearchParameters(venue)
   const { searchState } = useSearch()
   const isUserUnderage = useIsUserUnderage()
-  const { data: selectedVenueOffers } = useVenueOffers({
+  const { data: selectedVenueOffers } = useVenueOffersQuery({
     userLocation,
     selectedLocationMode,
     isUserUnderage,
diff --git a/src/features/venueMap/pages/VenueMap/VenueMap.native.test.tsx b/src/features/venueMap/pages/VenueMap/VenueMap.native.test.tsx
index 419f62268f97..cc9cad4793d6 100644
--- a/src/features/venueMap/pages/VenueMap/VenueMap.native.test.tsx
+++ b/src/features/venueMap/pages/VenueMap/VenueMap.native.test.tsx
@@ -4,7 +4,6 @@ import { UseQueryResult } from 'react-query'
 
 import { VenueTypeCodeKey } from 'api/gen'
 import * as useGoBack from 'features/navigation/useGoBack'
-import * as useVenueOffers from 'features/venue/api/useVenueOffers'
 import * as useVenueSearchParameters from 'features/venue/helpers/useVenueSearchParameters'
 import { VenueOffers } from 'features/venue/types'
 import { FILTERS_VENUE_TYPE_MAPPING } from 'features/venueMap/constant'
@@ -14,6 +13,7 @@ import { venuesFilterActions } from 'features/venueMap/store/venuesFilterStore'
 import mockVenueSearchParams from 'fixtures/venueSearchParams'
 import { setFeatureFlags } from 'libs/firebase/firestore/featureFlags/__tests__/setFeatureFlags'
 import { RemoteStoreFeatureFlags } from 'libs/firebase/firestore/types'
+import * as useVenueOffersQueryAPI from 'queries/venue/useVenueOffersQuery'
 import { reactQueryProviderHOC } from 'tests/reactQueryProviderHOC'
 import { render, screen, userEvent, waitFor } from 'tests/utils'
 
@@ -25,7 +25,7 @@ jest.mock('react-native-gesture-handler/lib/commonjs/handlers/gestures/GestureDe
 const mockUseRoute = useRoute as jest.Mock
 mockUseRoute.mockReturnValue({ name: 'venueMap' })
 
-jest.spyOn(useVenueOffers, 'useVenueOffers').mockReturnValue({
+jest.spyOn(useVenueOffersQueryAPI, 'useVenueOffersQuery').mockReturnValue({
   isLoading: false,
   data: { hits: [], nbHits: 0 },
 } as unknown as UseQueryResult<VenueOffers, unknown>)
diff --git a/src/features/venue/api/__mocks__/useVenueOffers.ts b/src/queries/venue/__mocks__/useVenueOffersQuery.ts
similarity index 81%
rename from src/features/venue/api/__mocks__/useVenueOffers.ts
rename to src/queries/venue/__mocks__/useVenueOffersQuery.ts
index 5df6d46c0184..6363584f453d 100644
--- a/src/features/venue/api/__mocks__/useVenueOffers.ts
+++ b/src/queries/venue/__mocks__/useVenueOffersQuery.ts
@@ -1,5 +1,5 @@
 import { VenueOffersResponseSnap } from 'features/venue/fixtures/venueOffersResponseSnap'
 
-export const useVenueOffers = jest
+export const useVenueOffersQuery = jest
   .fn()
   .mockReturnValue({ data: { hits: VenueOffersResponseSnap, nbHits: 4 } })
diff --git a/src/features/venue/api/useVenueOffers.test.ts b/src/queries/venue/useVenueOffersQuery.test.ts
similarity index 98%
rename from src/features/venue/api/useVenueOffers.test.ts
rename to src/queries/venue/useVenueOffersQuery.test.ts
index c3e2c24ff995..7a7c9c4dba60 100644
--- a/src/features/venue/api/useVenueOffers.test.ts
+++ b/src/queries/venue/useVenueOffersQuery.test.ts
@@ -1,5 +1,4 @@
 import { SubcategoryIdEnum } from 'api/gen'
-import { useVenueOffers } from 'features/venue/api/useVenueOffers'
 import mockVenueResponse from 'fixtures/venueResponse'
 import mockVenueSearchParams from 'fixtures/venueSearchParams'
 import { fetchMultipleOffers } from 'libs/algolia/fetchAlgolia/fetchMultipleOffers/fetchMultipleOffers'
@@ -9,6 +8,7 @@ import {
 } from 'libs/algolia/fetchAlgolia/transformOfferHit'
 import { AlgoliaOffer, HitOffer } from 'libs/algolia/types'
 import { LocationMode, Position } from 'libs/location/types'
+import { useVenueOffersQuery } from 'queries/venue/useVenueOffersQuery'
 import { reactQueryProviderHOC } from 'tests/reactQueryProviderHOC'
 import { renderHook, waitFor } from 'tests/utils'
 
@@ -126,7 +126,7 @@ describe('useVenueOffers', () => {
 
     const { result } = renderHook(
       () =>
-        useVenueOffers({
+        useVenueOffersQuery({
           userLocation: mockUserLocation,
           selectedLocationMode: mockLocationMode,
           venue: mockVenueResponse,
diff --git a/src/features/venue/api/useVenueOffers.ts b/src/queries/venue/useVenueOffersQuery.ts
similarity index 98%
rename from src/features/venue/api/useVenueOffers.ts
rename to src/queries/venue/useVenueOffersQuery.ts
index 3fbb459d0575..161ffd120c64 100644
--- a/src/features/venue/api/useVenueOffers.ts
+++ b/src/queries/venue/useVenueOffersQuery.ts
@@ -28,7 +28,7 @@ type UseVenueOffersParams = {
   includeHitsWithoutImage?: boolean
 }
 
-export const useVenueOffers = ({
+export const useVenueOffersQuery = ({
   userLocation,
   selectedLocationMode,
   isUserUnderage,


Reviews:
user: login: bebstein-pass
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-28T11:06:51Z
user: login: bebstein-pass
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-04-28T16:54:07Z
user: login: mmeissonnier-pass
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-29T07:28:17Z
user: login: mmeissonnier-pass
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-04-29T07:29:35Z
user: login: bebstein-pass
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-29T07:45:10Z
user: login: bebstein-pass
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-04-29T12:29:36Z
user: login: bebstein-pass
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-05T09:45:59Z

Review comments:
diff_hunk: @@ -21,14 +20,15 @@ import { analytics } from 'libs/analytics/provider'
 import { setFeatureFlags } from 'libs/firebase/firestore/featureFlags/__tests__/setFeatureFlags'
 import { RemoteStoreFeatureFlags } from 'libs/firebase/firestore/types'
 import { LocationMode } from 'libs/location/types'
+import * as useVenueOffers from 'queries/venue/useVenueOffersQuery/useVenueOffersQuery'
path: src/features/venue/components/VenueOffers/VenueOffers.native.test.tsx
user: login: bebstein-pass
body: généralement, dans notre codebase, on suffix le nom du fichier avec `API` quand on fait un `import * as trucAPI from 'lib/truc'`

```suggestion
import * as useVenueOffersQueryAPI from 'queries/venue/useVenueOffersQuery/useVenueOffersQuery'
```
created_at: 2025-04-28T10:53:23Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,26 @@
+import { useQuery } from 'react-query'
+
+import { api } from 'api/api'
+import { VenueResponse } from 'api/gen'
+import { VenueNotFound } from 'features/venue/pages/VenueNotFound/VenueNotFound'
+import { useLogTypeFromRemoteConfig } from 'libs/hooks/useLogTypeFromRemoteConfig'
+import { VenueNotFoundError } from 'libs/monitoring/errors'
+import { QueryKeys } from 'libs/queryKeys'
+
+export const useVenueQuery = (venueId: number, options?: { enabled?: boolean }) => {
+  const { logType } = useLogTypeFromRemoteConfig()
+
+  return useQuery<VenueResponse | undefined>(
+    [QueryKeys.VENUE, venueId],
+    () => api.getNativeV1VenuevenueId(venueId),
+    {
+      onError: (_error) => {
+        throw new VenueNotFoundError(venueId, {
+          Screen: VenueNotFound,
path: src/features/venue/queries/useVenueQuery.ts
user: login: bebstein-pass
body: le code était déjà comme ça avant, ça me va de le merger en l'état

---

le hook de la requete react-query a une dépendance vers un composant de page d'erreur

@bpeyrou-pass @mmeissonnier-pass qu'en pensez-vous ?
created_at: 2025-04-28T10:58:12Z
author_association: CONTRIBUTOR
path: src/features/venue/queries/__mocks__/useVenueOffersQuery.ts
user: login: bebstein-pass
body: dans le dossier parant, je ne vois que `useVenueQuery`

ce mock permet de mocker quel fichier ?
created_at: 2025-04-28T11:01:34Z
author_association: CONTRIBUTOR
path: src/queries/venue/useVenueOffersQuery/useVenueOffers.test.ts
user: login: bebstein-pass
body: les autres queries n'ont pas de sous dossier

le fichier devrait etre suffixé de `Query`

```diff
-src/queries/venue/useVenueOffersQuery/useVenueOffers.test.ts
+src/queries/venue/useVenueOffersQuery.test.ts
```
created_at: 2025-04-28T11:03:01Z
author_association: CONTRIBUTOR
path: src/queries/venue/useVenueOffersQuery/useVenueOffersQuery.ts
user: login: bebstein-pass
body: les autres queries n'ont pas de sous dossier

```diff
-src/queries/venue/useVenueOffersQuery/useVenueOffersQuery.ts
+src/queries/venue/useVenueOffersQuery.ts
```
created_at: 2025-04-28T11:06:29Z
author_association: CONTRIBUTOR
diff_hunk: @@ -14,6 +13,7 @@ import { venuesFilterActions } from 'features/venueMap/store/venuesFilterStore'
 import mockVenueSearchParams from 'fixtures/venueSearchParams'
 import { setFeatureFlags } from 'libs/firebase/firestore/featureFlags/__tests__/setFeatureFlags'
 import { RemoteStoreFeatureFlags } from 'libs/firebase/firestore/types'
+import * as useVenueOffers from 'queries/venue/useVenueOffersQuery'
path: src/features/venueMap/pages/VenueMap/VenueMap.native.test.tsx
user: login: bebstein-pass
body: ```suggestion
import * as useVenueOffersQueryAPI from 'queries/venue/useVenueOffersQuery'
```
created_at: 2025-04-28T16:52:55Z
author_association: CONTRIBUTOR
diff_hunk: @@ -20,6 +19,7 @@ import mockVenueSearchParams from 'fixtures/venueSearchParams'
 import { venuesFixture } from 'libs/algolia/fetchAlgolia/fetchVenues/fixtures/venuesFixture'
 import { setFeatureFlags } from 'libs/firebase/firestore/featureFlags/__tests__/setFeatureFlags'
 import { RemoteStoreFeatureFlags } from 'libs/firebase/firestore/types'
+import * as useVenueOffers from 'queries/venue/useVenueOffersQuery'
path: src/features/venueMap/components/VenueMapView/VenueMapViewContainer.native.test.tsx
user: login: bebstein-pass
body: ```suggestion
import * as useVenueOffersQueryAPI from 'queries/venue/useVenueOffersQuery'
```
created_at: 2025-04-28T16:53:26Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,26 @@
+import { useQuery } from 'react-query'
+
+import { api } from 'api/api'
+import { VenueResponse } from 'api/gen'
+import { VenueNotFound } from 'features/venue/pages/VenueNotFound/VenueNotFound'
+import { useLogTypeFromRemoteConfig } from 'libs/hooks/useLogTypeFromRemoteConfig'
+import { VenueNotFoundError } from 'libs/monitoring/errors'
+import { QueryKeys } from 'libs/queryKeys'
+
+export const useVenueQuery = (venueId: number, options?: { enabled?: boolean }) => {
+  const { logType } = useLogTypeFromRemoteConfig()
+
+  return useQuery<VenueResponse | undefined>(
+    [QueryKeys.VENUE, venueId],
+    () => api.getNativeV1VenuevenueId(venueId),
+    {
+      onError: (_error) => {
+        throw new VenueNotFoundError(venueId, {
+          Screen: VenueNotFound,
path: src/features/venue/queries/useVenueQuery.ts
user: login: mmeissonnier-pass
body: Oui en effet ce n'est pas de la responsabilité de ce hook. Il faudrait corriger ça ultérieurement 
created_at: 2025-04-29T07:28:17Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,26 @@
+import { useQuery } from 'react-query'
+
+import { api } from 'api/api'
+import { VenueResponse } from 'api/gen'
+import { VenueNotFound } from 'features/venue/pages/VenueNotFound/VenueNotFound'
+import { useLogTypeFromRemoteConfig } from 'libs/hooks/useLogTypeFromRemoteConfig'
+import { VenueNotFoundError } from 'libs/monitoring/errors'
+import { QueryKeys } from 'libs/queryKeys'
+
+export const useVenueQuery = (venueId: number, options?: { enabled?: boolean }) => {
+  const { logType } = useLogTypeFromRemoteConfig()
+
+  return useQuery<VenueResponse | undefined>(
+    [QueryKeys.VENUE, venueId],
+    () => api.getNativeV1VenuevenueId(venueId),
+    {
+      onError: (_error) => {
+        throw new VenueNotFoundError(venueId, {
+          Screen: VenueNotFound,
path: src/features/venue/queries/useVenueQuery.ts
user: login: bebstein-pass
body: de quelle manière penses-tu qu'il serait bien de le corriger ?

created_at: 2025-04-29T07:45:10Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,26 @@
+import { useQuery } from 'react-query'
+
+import { api } from 'api/api'
+import { VenueResponse } from 'api/gen'
+import { VenueNotFound } from 'features/venue/pages/VenueNotFound/VenueNotFound'
+import { useLogTypeFromRemoteConfig } from 'libs/hooks/useLogTypeFromRemoteConfig'
+import { VenueNotFoundError } from 'libs/monitoring/errors'
+import { QueryKeys } from 'libs/queryKeys'
+
+export const useVenueQuery = (venueId: number, options?: { enabled?: boolean }) => {
+  const { logType } = useLogTypeFromRemoteConfig()
+
+  return useQuery<VenueResponse | undefined>(
+    [QueryKeys.VENUE, venueId],
+    () => api.getNativeV1VenuevenueId(venueId),
+    {
+      onError: (_error) => {
+        throw new VenueNotFoundError(venueId, {
+          Screen: VenueNotFound,
path: src/features/venue/queries/useVenueQuery.ts
user: login: bebstein-pass
body: faire un `useEffect` sur le `isError` dans l'appelant
created_at: 2025-05-05T09:45:53Z
author_association: CONTRIBUTOR

PR comments:
user: login: sonarqubecloud[bot]
created_at: 2025-03-12T17:18:37Z
body: ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=pass-culture_pass-culture-app-native-proxy&pullRequest=7790) **Quality Gate passed**  
Issues  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=pass-culture_pass-culture-app-native-proxy&pullRequest=7790&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=pass-culture_pass-culture-app-native-proxy&pullRequest=7790&issueStatuses=ACCEPTED)

Measures  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=pass-culture_pass-culture-app-native-proxy&pullRequest=7790&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=pass-culture_pass-culture-app-native-proxy&pullRequest=7790&metric=new_coverage&view=list)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=pass-culture_pass-culture-app-native-proxy&pullRequest=7790&metric=new_duplicated_lines_density&view=list)  
  
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=pass-culture_pass-culture-app-native-proxy&pullRequest=7790)


author_association: NONE
user: login: sonarqubecloud[bot]
created_at: 2025-03-12T17:25:53Z
body: ## [![Quality Gate Failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-failed-20px.png 'Quality Gate Failed')](https://sonarcloud.io/dashboard?id=pass-culture_pass-culture-app-native&pullRequest=7790) **Quality Gate failed**  
Failed conditions  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/failed-16px.png '') [1 New Code Smells](https://sonarcloud.io/dashboard?id=pass-culture_pass-culture-app-native&pullRequest=7790) (required ≤ 0)  
  
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=pass-culture_pass-culture-app-native&pullRequest=7790)

##   
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/light_bulb-16px.png '') Catch issues before they fail your Quality Gate with our IDE extension ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/sonarlint-16px.png '') [SonarQube for IDE](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=pull-request)


author_association: NONE
user: login: sonarqubecloud[bot]
created_at: 2025-04-29T10:35:30Z
body: ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=pass-culture_pass-culture-app-native-proxy&pullRequest=7790) **Quality Gate passed**  
Issues  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=pass-culture_pass-culture-app-native-proxy&pullRequest=7790&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=pass-culture_pass-culture-app-native-proxy&pullRequest=7790&issueStatuses=ACCEPTED)

Measures  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=pass-culture_pass-culture-app-native-proxy&pullRequest=7790&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=pass-culture_pass-culture-app-native-proxy&pullRequest=7790&metric=new_coverage&view=list)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=pass-culture_pass-culture-app-native-proxy&pullRequest=7790&metric=new_duplicated_lines_density&view=list)  
  
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=pass-culture_pass-culture-app-native-proxy&pullRequest=7790)


author_association: NONE
user: login: sonarqubecloud[bot]
created_at: 2025-04-29T10:42:01Z
body: ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=pass-culture_pass-culture-app-native&pullRequest=7790) **Quality Gate passed**  
Issues  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=pass-culture_pass-culture-app-native&pullRequest=7790&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=pass-culture_pass-culture-app-native&pullRequest=7790&issueStatuses=ACCEPTED)

Measures  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=pass-culture_pass-culture-app-native&pullRequest=7790&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [93.8% Coverage on New Code](https://sonarcloud.io/component_measures?id=pass-culture_pass-culture-app-native&pullRequest=7790&metric=new_coverage&view=list)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=pass-culture_pass-culture-app-native&pullRequest=7790&metric=new_duplicated_lines_density&view=list)  
  
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=pass-culture_pass-culture-app-native&pullRequest=7790)


author_association: NONE