Refactor recoil v4 (#3266)

* Refactor recoil v4

* Fix ci
This commit is contained in:
Charles Bochet
2024-01-05 19:18:22 +01:00
committed by GitHub
parent 8455e15443
commit 96264e264c
140 changed files with 467 additions and 482 deletions

View File

@ -1,7 +1,7 @@
import { ScopedStateKey } from '@/ui/utilities/recoil-scope/scopes-internal/types/ScopedStateKey';
import { StateScopeMapKey } from '@/ui/utilities/recoil-scope/scopes-internal/types/StateScopeMapKey';
import { createScopeInternalContext } from '@/ui/utilities/recoil-scope/scopes-internal/utils/createScopeInternalContext';
type DialogManagerScopeInternalContextProps = ScopedStateKey;
type DialogManagerScopeInternalContextProps = StateScopeMapKey;
export const DialogManagerScopeInternalContext =
createScopeInternalContext<DialogManagerScopeInternalContextProps>();

View File

@ -1,4 +1,4 @@
import { createScopedState } from '@/ui/utilities/recoil-scope/utils/createScopedState';
import { createStateScopeMap } from '@/ui/utilities/recoil-scope/utils/createStateScopeMap';
import { DialogOptions } from '../types/DialogOptions';
@ -7,7 +7,7 @@ type DialogState = {
queue: DialogOptions[];
};
export const dialogInternalScopedState = createScopedState<DialogState>({
export const dialogInternalScopedState = createStateScopeMap<DialogState>({
key: 'dialog/internal-state',
defaultValue: {
maxQueue: 2,

View File

@ -1,7 +1,7 @@
import { ScopedStateKey } from '@/ui/utilities/recoil-scope/scopes-internal/types/ScopedStateKey';
import { StateScopeMapKey } from '@/ui/utilities/recoil-scope/scopes-internal/types/StateScopeMapKey';
import { createScopeInternalContext } from '@/ui/utilities/recoil-scope/scopes-internal/utils/createScopeInternalContext';
type SnackBarManagerScopeInternalContextProps = ScopedStateKey;
type SnackBarManagerScopeInternalContextProps = StateScopeMapKey;
export const SnackBarManagerScopeInternalContext =
createScopeInternalContext<SnackBarManagerScopeInternalContextProps>();

View File

@ -1,4 +1,4 @@
import { createScopedState } from '@/ui/utilities/recoil-scope/utils/createScopedState';
import { createStateScopeMap } from '@/ui/utilities/recoil-scope/utils/createStateScopeMap';
import { SnackBarProps } from '../components/SnackBar';
@ -11,7 +11,7 @@ type SnackBarState = {
queue: SnackBarOptions[];
};
export const snackBarInternalScopedState = createScopedState<SnackBarState>({
export const snackBarInternalScopedState = createStateScopeMap<SnackBarState>({
key: 'snackBarState',
defaultValue: {
maxQueue: 3,