File tree Expand file tree Collapse file tree
apps/hub/src/domains/project/components/actors
packages/components/src/actors Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -91,7 +91,9 @@ export function ActorsProvider({
9191 // biome-ignore lint/correctness/useExhaustiveDependencies: store is not a dependency
9292 useEffect ( ( ) => {
9393 if ( internalFilter ) {
94- store . set ( actorsInternalFilterAtom , internalFilter ) ;
94+ store . set ( actorsInternalFilterAtom , { fn : internalFilter } ) ;
95+ } else {
96+ store . set ( actorsInternalFilterAtom , undefined ) ;
9597 }
9698 } , [ internalFilter ] ) ;
9799
Original file line number Diff line number Diff line change @@ -112,7 +112,9 @@ export const actorRegionsAtom = atom<Region[]>([
112112
113113export const actorBuildsAtom = atom < Build [ ] > ( [ ] ) ;
114114
115- export const actorsInternalFilterAtom = atom < ( actor : Actor ) => boolean > ( ) ;
115+ export const actorsInternalFilterAtom = atom < {
116+ fn : ( actor : Actor ) => boolean ;
117+ } > ( ) ;
116118
117119// derived atoms
118120
@@ -129,7 +131,7 @@ export const filteredActorsAtom = atom((get) => {
129131 const filters = get ( actorFiltersAtom ) ;
130132 const actors = get ( actorsAtom ) ;
131133
132- const isActorInternal = get ( actorsInternalFilterAtom ) ;
134+ const isActorInternal = get ( actorsInternalFilterAtom ) ?. fn ;
133135
134136 return actors . filter ( ( actor ) => {
135137 const satisfiesFilters = Object . entries ( filters ) . every (
You can’t perform that action at this time.
0 commit comments