File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -96,4 +96,5 @@ export const REACT_COMPILED_FILES = [
9696 "apps/web/src/components/pullRequest/PullRequestDetailPanel.tsx" ,
9797 "apps/web/src/components/ThreadTerminalDrawer.tsx" ,
9898 "apps/web/src/components/settings/SettingsPanels.tsx" ,
99+ "apps/web/src/components/chat/useAutoBalanceUpdateBanner.tsx" ,
99100] as const ;
Original file line number Diff line number Diff line change 11import { useAtomValue } from "@effect/atom-react" ;
22import type { ServerUpdateState } from "@t3tools/client-runtime/state/server" ;
33import { Atom } from "effect/reactivity" ;
4- import { useMemo , useState } from "react" ;
4+ import { useState } from "react" ;
55
66import type { EnvironmentPresentation } from "~/state/environments" ;
77import { serverEnvironment } from "~/state/server" ;
@@ -29,15 +29,11 @@ import { ComposerServerUpdateIcon } from "./ComposerServerUpdateStatus";
2929export function useAutoBalanceUpdateBanner (
3030 environments : readonly EnvironmentPresentation [ ] ,
3131) : ComposerBannerStackItem | null {
32- const statesAtom = useMemo (
33- ( ) =>
34- Atom . make ( ( get ) =>
35- environments . map ( ( environment ) => ( {
36- environment,
37- state : get ( serverEnvironment . updateStateAtom ( environment . environmentId ) ) ,
38- } ) ) ,
39- ) ,
40- [ environments ] ,
32+ const statesAtom = Atom . make ( ( get ) =>
33+ environments . map ( ( environment ) => ( {
34+ environment,
35+ state : get ( serverEnvironment . updateStateAtom ( environment . environmentId ) ) ,
36+ } ) ) ,
4137 ) ;
4238 const states = useAtomValue ( statesAtom ) ;
4339 const [ dismissedNotices , setDismissedNotices ] = useState < ReadonlySet < string | ServerUpdateState > > (
You can’t perform that action at this time.
0 commit comments