11import { useEffect , useState } from 'react' ;
22import { RunDetailRouteParams } from '.' ;
3- import { runPagesActions , runsActions } from '../../../../redux/actions' ;
4- import { runPagesSelectors , runSelectors } from '../../../../redux/selectors' ;
3+ import { runsActions } from '../../../../redux/actions' ;
4+ import { runSelectors } from '../../../../redux/selectors' ;
55import { useDispatch , useParams , useSelector } from '../../../hooks' ;
66
77interface ServiceInterface {
@@ -15,7 +15,7 @@ export const useService = (): ServiceInterface => {
1515 const dispatch = useDispatch ( ) ;
1616 const { id, pipelineId } = useParams < RunDetailRouteParams > ( ) ;
1717 const [ isMounted , setIsMounted ] = useState ( false ) ;
18-
18+ const [ fetching , setFetching ] = useState ( false ) ;
1919 useEffect ( ( ) => {
2020 if ( ! isMounted ) {
2121 setFetching ( true ) ;
@@ -42,10 +42,10 @@ export const useService = (): ServiceInterface => {
4242
4343 const run = useSelector ( runSelectors . runForId ( id ) ) ;
4444
45- const setFetching = ( fetching : boolean ) => {
46- dispatch ( runPagesActions . setFetching ( { fetching } ) ) ;
47- } ;
48- const fetching = useSelector ( runPagesSelectors . fetching ) ;
45+ // const setFetching = (fetching: boolean) => {
46+ // dispatch(runPagesActions.setFetching({ fetching }));
47+ // };
48+ // const fetching = useSelector(runPagesSelectors.fetching);
4949
5050 return { runId : id , pipelineId, run, fetching } ;
5151} ;
0 commit comments