mirror of
https://github.com/langgenius/dify.git
synced 2026-05-10 14:14:17 +08:00
fix(sandbox): fetch artifacts on mount for blue dot indicator
Remove enabled condition so data is fetched when component mounts, allowing blue dot to show when files exist even before expanding. TanStack Query handles request deduplication automatically.
This commit is contained in:
parent
5cdd69e7e0
commit
2c02c8ac18
@ -23,9 +23,7 @@ const ArtifactsSection: FC<ArtifactsSectionProps> = ({ className }) => {
|
||||
|
||||
const [isExpanded, setIsExpanded] = useState(false)
|
||||
|
||||
const { data: treeData, hasFiles, isLoading } = useSandboxFilesTree(sandboxId, {
|
||||
enabled: isExpanded,
|
||||
})
|
||||
const { data: treeData, hasFiles, isLoading } = useSandboxFilesTree(sandboxId)
|
||||
|
||||
const downloadMutation = useDownloadSandboxFile(sandboxId)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user