|
1 | 1 | import { useEffect } from 'react'; |
2 | | -import { useDispatch, useSelector } from 'react-redux'; |
3 | | -import { pipelinesActions } from '../../../../../redux/actions'; |
| 2 | +import { useSelector } from 'react-redux'; |
| 3 | +// import { pipelinesActions } from '../../../../../redux/actions'; |
4 | 4 | import { |
5 | 5 | runPagesSelectors, |
6 | 6 | runSelectors, |
@@ -33,34 +33,34 @@ export const useService = ({ |
33 | 33 | sortBy: string; |
34 | 34 | pipelineId: TId; |
35 | 35 | }): ServiceInterface => { |
36 | | - const dispatch = useDispatch(); |
| 36 | + // const dispatch = useDispatch(); |
37 | 37 | const fetching = useSelector(runPagesSelectors.fetching); |
38 | 38 | const runs: Run[] = useSelector(runSelectors.runsForPipelineId(pipelineId)); |
39 | 39 | const runsPaginated = useSelector(runSelectors.myRunsPaginated); |
40 | | - const isValidFilter = filter.map((f) => f.value).join(''); |
| 40 | + // const isValidFilter = filter.map((f) => f.value).join(''); |
41 | 41 |
|
42 | 42 | useEffect(() => {}, [runs]); |
43 | | - useEffect(() => { |
44 | | - if (!isValidFilter && !isExpended) { |
45 | | - const intervalId = setInterval(() => { |
46 | | - //assign interval to a variable to clear it. |
| 43 | + // useEffect(() => { |
| 44 | + // if (!isValidFilter && !isExpended) { |
| 45 | + // const intervalId = setInterval(() => { |
| 46 | + // //assign interval to a variable to clear it. |
47 | 47 |
|
48 | | - dispatch( |
49 | | - pipelinesActions.allRunsByPipelineId({ |
50 | | - sort_by: sortBy, |
51 | | - logical_operator: 'and', |
52 | | - pipelineId: pipelineId, |
53 | | - page: runsPaginated.page, |
54 | | - size: runsPaginated.size, |
55 | | - }), |
56 | | - ); |
57 | | - }, 5000); |
| 48 | + // dispatch( |
| 49 | + // pipelinesActions.allRunsByPipelineId({ |
| 50 | + // sort_by: sortBy, |
| 51 | + // logical_operator: 'and', |
| 52 | + // pipelineId: pipelineId, |
| 53 | + // page: runsPaginated.page, |
| 54 | + // size: runsPaginated.size, |
| 55 | + // }), |
| 56 | + // ); |
| 57 | + // }, 5000); |
58 | 58 |
|
59 | | - return () => clearInterval(intervalId); |
60 | | - } |
61 | | - //This is important |
62 | | - // eslint-disable-next-line react-hooks/exhaustive-deps |
63 | | - }, [pipelineId, runsPaginated]); |
| 59 | + // return () => clearInterval(intervalId); |
| 60 | + // } |
| 61 | + // //This is important |
| 62 | + // // eslint-disable-next-line react-hooks/exhaustive-deps |
| 63 | + // }, [pipelineId, runsPaginated]); |
64 | 64 |
|
65 | 65 | const runIds = runs.map((run: Run) => run.id); |
66 | 66 |
|
|
0 commit comments