fix(pipeline-tasks): 任务详情 多次订阅任务变化的问题。

This commit is contained in:
Ivan Li 2021-04-04 10:44:30 +08:00
parent df5a6963e1
commit 148dcfee06

View File

@ -118,10 +118,14 @@ export const PipelineTaskDetails = ({ taskId }: Props) => {
{ taskId: string }
>(FIND_PIPELINE_TASK, { variables: { taskId } });
subscribeToMore({
document: PIPELINE_TASK_CHANGED,
variables: { taskId }
});
useMemo(
() =>
subscribeToMore({
document: PIPELINE_TASK_CHANGED,
variables: { taskId }
}),
[subscribeToMore, taskId]
);
const store = useLocalObservable(() => new Store());