mirror of
https://github.com/langgenius/dify.git
synced 2026-05-03 08:58:09 +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:
@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user