diff --git a/packages/plugins/@nocobase/plugin-workflow/src/client/WorkflowTasks.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/WorkflowTasks.tsx index 6b843ce024..a638697118 100644 --- a/packages/plugins/@nocobase/plugin-workflow/src/client/WorkflowTasks.tsx +++ b/packages/plugins/@nocobase/plugin-workflow/src/client/WorkflowTasks.tsx @@ -64,7 +64,11 @@ export interface TaskTypeOptions { // children?: TaskTypeOptions[]; } -const TasksCountsContext = createContext<{ counts: Record; total: number }>({ counts: {}, total: 0 }); +const TasksCountsContext = createContext<{ reload: () => void; counts: Record; total: number }>({ + reload() {}, + counts: {}, + total: 0, +}); function MenuLink({ type }: any) { const workflowPlugin = usePlugin(PluginWorkflowClient); @@ -299,13 +303,13 @@ export function WorkflowTasks() { function WorkflowTasksLink() { const workflowPlugin = usePlugin(PluginWorkflowClient); - const { total } = useContext(TasksCountsContext); + const { reload, total } = useContext(TasksCountsContext); const types = Array.from(workflowPlugin.taskTypes.getKeys()); return types.length ? (