Files
twenty_crm/front/src/modules/ui/utilities/recoil-scope/utils/getScopedState.ts
Lucas Bordeau 53072298bc Feat/improve new views (#2298)
* POC new recoil injected scoped states

* Finished useViewScopedState refactor

* Finished refactor

* Renamed mappers

* Fixed update view fields bug

* Post merge

* Complete refactor

* Fix tests

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2023-11-04 09:28:55 +01:00

11 lines
236 B
TypeScript

import { RecoilScopedState } from '../types/RecoilScopedState';
export const getScopedState = <StateType>(
recoilScopedState: RecoilScopedState<StateType>,
scopeId: string,
) => {
return recoilScopedState({
scopeId,
});
};