()
| 45 | } |
| 46 | |
| 47 | export function useAllClusters() { |
| 48 | const result = useAtomValue(allClusters); |
| 49 | return React.useMemo( |
| 50 | () => ({ |
| 51 | ...result, |
| 52 | isError: Boolean(result.error), |
| 53 | getClusterById: (clusterId: string) => |
| 54 | result.data.find((c) => c.id === clusterId), |
| 55 | }), |
| 56 | [result], |
| 57 | ); |
| 58 | } |
no test coverage detected