Skip to content

Commit 9286df4

Browse files
committed
Room - After creating room and changing priority mode offline, room shows skeleton
1 parent f48a826 commit 9286df4

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/pages/home/report/ReportActionsView.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,13 @@ function ReportActionsView({
276276
};
277277
}, [isTheFirstReportActionIsLinked]);
278278

279-
if ((isLoadingInitialReportActions && (isReportDataIncomplete || isMissingReportActions) && !isOffline) ?? isLoadingApp) {
279+
// Show skeleton while loading initial report actions when data is incomplete/missing and online
280+
const shouldShowSkeletonForInitialLoad = isLoadingInitialReportActions && (isReportDataIncomplete || isMissingReportActions) && !isOffline;
281+
282+
// Show skeleton while the app is loading and we're online
283+
const shouldShowSkeletonForAppLoad = isLoadingApp && !isOffline;
284+
285+
if (shouldShowSkeletonForInitialLoad ?? shouldShowSkeletonForAppLoad) {
280286
return <ReportActionsSkeletonView />;
281287
}
282288

0 commit comments

Comments
 (0)