From 0482a9e3855033e84e3c8f5593fe625246e7ebbf Mon Sep 17 00:00:00 2001 From: thoreyjona Date: Tue, 17 Sep 2024 10:10:48 +0000 Subject: [PATCH] feat: use createSkeletonArr helper function --- .../screens/applications/components/applications-list.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/apps/native/app/src/screens/applications/components/applications-list.tsx b/apps/native/app/src/screens/applications/components/applications-list.tsx index ef4de4eb69aef..24ddf1755da9f 100644 --- a/apps/native/app/src/screens/applications/components/applications-list.tsx +++ b/apps/native/app/src/screens/applications/components/applications-list.tsx @@ -25,6 +25,7 @@ import { import { useBrowser } from '../../../lib/use-browser' import { getApplicationUrl } from '../../../utils/applications-utils' import { BottomTabsIndicator } from '../../../components/bottom-tabs-indicator/bottom-tabs-indicator' +import { createSkeletonArr } from '../../../utils/create-skeleton-arr' type FlatListItem = | Application @@ -172,10 +173,7 @@ export const ApplicationsList = ({ const data = useMemo(() => { if (applicationsRes.loading && !applicationsRes.data) { - return Array.from({ length: 5 }).map((_, id) => ({ - id: String(id), - __typename: 'Skeleton', - })) + return createSkeletonArr(5) } if (applications.length === 0) { return [{ id: '0', __typename: 'Empty' }]