77import { Discovery } from "@t3tools/client-runtime/relay" ;
88import type { EnvironmentId } from "@t3tools/contracts" ;
99import * as Option from "effect/Option" ;
10- import { useMemo } from "react" ;
1110
1211import { environmentCatalog } from "../connection/catalog" ;
1312import {
@@ -44,12 +43,8 @@ export function useEnvironments() {
4443 const networkStatus = useAtomValue ( environmentCatalog . networkStatusValueAtom ) ;
4544 const presentationById = useAtomValue ( environmentPresentations . presentationsAtom ) ;
4645
47- const environments = useMemo (
48- ( ) =>
49- [ ...presentationById . entries ( ) ] . map ( ( [ environmentId , presentation ] ) =>
50- projectEnvironmentPresentation ( environmentId , presentation ) ,
51- ) ,
52- [ presentationById ] ,
46+ const environments = [ ...presentationById . entries ( ) ] . map ( ( [ environmentId , presentation ] ) =>
47+ projectEnvironmentPresentation ( environmentId , presentation ) ,
5348 ) ;
5449
5550 return {
@@ -68,13 +63,9 @@ export function useEnvironment(
6863 environmentId : EnvironmentId | null ,
6964) : EnvironmentPresentation | null {
7065 const { presentation } = useEnvironmentPresentation ( environmentId ) ;
71- return useMemo (
72- ( ) =>
73- environmentId === null || presentation === null
74- ? null
75- : projectEnvironmentPresentation ( environmentId , presentation ) ,
76- [ environmentId , presentation ] ,
77- ) ;
66+ return environmentId === null || presentation === null
67+ ? null
68+ : projectEnvironmentPresentation ( environmentId , presentation ) ;
7869}
7970
8071export function usePrimaryEnvironment ( ) : EnvironmentPresentation | null {
0 commit comments