diff --git a/front/packages/ui/src/fetch-infinite.tsx b/front/packages/ui/src/fetch-infinite.tsx index 24d51630..7e007e64 100644 --- a/front/packages/ui/src/fetch-infinite.tsx +++ b/front/packages/ui/src/fetch-infinite.tsx @@ -30,7 +30,7 @@ const emulateGap = ( gap: number, numColumns: number, index: number, - itemsCount: number + itemsCount: number, ): ViewStyle => { let marginLeft = 0; let marginRight = 0; @@ -107,7 +107,7 @@ export const InfiniteFetchList = ( const placeholders = [...Array(count === 0 ? numColumns : count)].map( (_, i) => ({ id: `gen${i}`, isLoading: true }) as Data, ); - const data = isFetching ? [...(items || []), ...placeholders] : items; + const data = isFetching || !items ? [...(items || []), ...placeholders] : items; const List = nested ? (FlatList as unknown as typeof FlashList) : FlashList; @@ -122,7 +122,7 @@ export const InfiniteFetchList = ( renderItem={({ item, index }) => ( = - | (Item & { isLoading?: false }) + | (Item & { isLoading: false }) | (Partial & { isLoading: true }); const isPage = (obj: unknown): obj is Page =>