feat: add views dropdown (list, add & edit views) (#1220)

Closes #1218
This commit is contained in:
Thaïs
2023-08-15 21:08:02 +02:00
committed by GitHub
parent 7a330b4a02
commit 4e654654da
36 changed files with 1037 additions and 212 deletions

View File

@ -4,13 +4,15 @@ import { v4 } from 'uuid';
import { RecoilScopeContext } from '../states/RecoilScopeContext';
export function RecoilScope({
SpecificContext,
children,
scopeId,
SpecificContext,
}: {
SpecificContext?: Context<string | null>;
children: React.ReactNode;
scopeId?: string;
SpecificContext?: Context<string | null>;
}) {
const currentScopeId = useRef(v4());
const currentScopeId = useRef(scopeId || v4());
return SpecificContext ? (
<SpecificContext.Provider value={currentScopeId.current}>