mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
refactor: Replace the useSubtypes
selection hook with a generic useSubtype
hook
This commit is contained in:
parent
ec26aeead2
commit
ef0fcc1537
4 changed files with 22 additions and 67 deletions
|
@ -5,7 +5,7 @@ import { trackEvent } from "../src/analytics";
|
|||
import { getDefaultAppState } from "../src/appState";
|
||||
import { ErrorDialog } from "../src/components/ErrorDialog";
|
||||
import { TopErrorBoundary } from "../src/components/TopErrorBoundary";
|
||||
import { useSubtypes } from "../src/element/subtypes/use";
|
||||
import { useMathSubtype } from "../src/element/subtypes/mathjax";
|
||||
import {
|
||||
APP_NAME,
|
||||
EVENT,
|
||||
|
@ -304,7 +304,7 @@ const ExcalidrawWrapper = () => {
|
|||
const [excalidrawAPI, excalidrawRefCallback] =
|
||||
useCallbackRefState<ExcalidrawImperativeAPI>();
|
||||
|
||||
useSubtypes(excalidrawAPI);
|
||||
useMathSubtype(excalidrawAPI);
|
||||
|
||||
const [collabAPI] = useAtom(collabAPIAtom);
|
||||
const [, setCollabDialogShown] = useAtom(collabDialogShownAtom);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue