Skip to content

Commit 609c6ce

Browse files
committed
fix loading state
1 parent a73746b commit 609c6ce

File tree

1 file changed

+2
-2
lines changed
  • apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-content

1 file changed

+2
-2
lines changed

apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-content/resource-content.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,10 +344,10 @@ interface EmbeddedFileProps {
344344
}
345345

346346
function EmbeddedFile({ workspaceId, fileId, previewMode }: EmbeddedFileProps) {
347-
const { data: files = [], isLoading } = useWorkspaceFiles(workspaceId)
347+
const { data: files = [], isLoading, isFetching } = useWorkspaceFiles(workspaceId)
348348
const file = useMemo(() => files.find((f) => f.id === fileId), [files, fileId])
349349

350-
if (isLoading) return LOADING_SKELETON
350+
if (isLoading || (isFetching && !file)) return LOADING_SKELETON
351351

352352
if (!file) {
353353
return (

0 commit comments

Comments
 (0)