feat: update jotai (#9015)
* feat: update jotai in excalidraw package * feat: update jotai in excalidraw-app * fix: exports from excalidraw/jotai * fix: use isolated react hooks * test: use jotai provider in <Trans /> test * remove unused package * refactor & make safer --------- Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
This commit is contained in:
@@ -8,8 +8,7 @@ import React, {
|
||||
useCallback,
|
||||
} from "react";
|
||||
import { Island } from "../Island";
|
||||
import { atom, useSetAtom } from "jotai";
|
||||
import { jotaiScope } from "../../jotai";
|
||||
import { atom, useSetAtom } from "../../editor-jotai";
|
||||
import type { SidebarProps, SidebarPropsContextValue } from "./common";
|
||||
import { SidebarPropsContext } from "./common";
|
||||
import { SidebarHeader } from "./SidebarHeader";
|
||||
@@ -58,7 +57,7 @@ export const SidebarInner = forwardRef(
|
||||
|
||||
const setAppState = useExcalidrawSetAppState();
|
||||
|
||||
const setIsSidebarDockedAtom = useSetAtom(isSidebarDockedAtom, jotaiScope);
|
||||
const setIsSidebarDockedAtom = useSetAtom(isSidebarDockedAtom);
|
||||
|
||||
useLayoutEffect(() => {
|
||||
setIsSidebarDockedAtom(!!docked);
|
||||
|
||||
Reference in New Issue
Block a user