File size: 374 Bytes
b59aa07
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
import { useSelector } from "react-redux";
import { RootState } from "#/store";

import { RUNTIME_INACTIVE_STATES } from "#/types/agent-state";

export const useHandleRuntimeActive = () => {
  const { curAgentState } = useSelector((state: RootState) => state.agent);

  const runtimeActive = !RUNTIME_INACTIVE_STATES.includes(curAgentState);

  return { runtimeActive };
};