diff --git a/packages/react-contexts/src/images-context/index.tsx b/packages/react-contexts/src/images-context/index.tsx index 3a8e2d528f..f46fff361f 100644 --- a/packages/react-contexts/src/images-context/index.tsx +++ b/packages/react-contexts/src/images-context/index.tsx @@ -52,12 +52,6 @@ const Context = createContext({ }, }) -const TYPE_MAPPING = { - attraction: 'poi', - restaurant: 'poi', - hotel: 'hotel', -} - export function ImagesProvider({ images: defaultImages, total: initialTotal, @@ -83,7 +77,7 @@ export function ImagesProvider({ const sendFetchRequest = useCallback( async (size = 15) => { const response = await fetchImages({ - target: { type: TYPE_MAPPING[type] || type, id }, + target: { type, id }, currentImageLength: images.length - (defaultImages?.length || 0), size, categoryOrder, @@ -107,7 +101,7 @@ export function ImagesProvider({ total, next, } = await fetchImages({ - target: { type: TYPE_MAPPING[type] || type, id }, + target: { type, id }, currentImageLength: 0, size: 15, categoryOrder,