| @@ -1,5 +1,6 @@ | ||
| 1 | 1 | import { getSiteImages } from '@library/api/WPApi'; |
| 2 | +import { siteImageUrls } from '@shared/lib/site-images'; | |
| 2 | 3 | import useSWRImmutable from 'swr/immutable'; |
| 3 | 4 | |
| 4 | 5 | export const useSiteImages = () => { |
| 5 | 6 | const { data, error, isLoading } = useSWRImmutable( |
| @@ -5,6 +6,7 @@ | ||
| 5 | 6 | const { data, error, isLoading } = useSWRImmutable( |
| 6 | 7 | 'library-site-images', |
| 7 | 8 | getSiteImages, |
| 8 | 9 | ); |
| 9 | - return { siteImages: data?.siteImages ?? [], error, isLoading }; | |
| 10 | + // Patterns here carry no type, so the banner picks are part of one pool. | |
| 11 | + return { siteImages: siteImageUrls(data?.siteImages), error, isLoading }; | |
| 10 | 12 | }; |