From e45977167a766408cdb994165cedc9d7424c5f2c Mon Sep 17 00:00:00 2001 From: Steve Ruiz Date: Fri, 15 Oct 2021 19:33:27 +0100 Subject: [PATCH] Restores context menu --- packages/tldraw/src/components/context-menu/context-menu.tsx | 5 ++--- packages/tldraw/src/components/tldraw/tldraw.tsx | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/tldraw/src/components/context-menu/context-menu.tsx b/packages/tldraw/src/components/context-menu/context-menu.tsx index b3415a0fb..5cb3a15d6 100644 --- a/packages/tldraw/src/components/context-menu/context-menu.tsx +++ b/packages/tldraw/src/components/context-menu/context-menu.tsx @@ -54,7 +54,7 @@ interface ContextMenuProps { children: React.ReactNode } -export const ContextMenu = React.memo(({ children }: ContextMenuProps): JSX.Element => { +export const ContextMenu = ({ children }: ContextMenuProps): JSX.Element => { const { tlstate, useSelector } = useTLDrawContext() const hasSelection = useSelector(has1SelectedIdsSelector) const hasTwoOrMore = useSelector(has2SelectedIdsSelector) @@ -225,7 +225,7 @@ export const ContextMenu = React.memo(({ children }: ContextMenuProps): JSX.Elem ) -}) +} function AlignDistributeSubMenu({ hasThreeOrMore, @@ -305,7 +305,6 @@ function AlignDistributeSubMenu({ )} - diff --git a/packages/tldraw/src/components/tldraw/tldraw.tsx b/packages/tldraw/src/components/tldraw/tldraw.tsx index 22f3a7abd..1367659bf 100644 --- a/packages/tldraw/src/components/tldraw/tldraw.tsx +++ b/packages/tldraw/src/components/tldraw/tldraw.tsx @@ -19,7 +19,7 @@ import { Menu } from '~components/menu' import { breakpoints, iconButton } from '~components' import { DotFilledIcon } from '@radix-ui/react-icons' import { TLDR } from '~state/tldr' -import { ContextMenu } from '@radix-ui/react-context-menu' +import { ContextMenu } from '~components/context-menu' // Selectors const isInSelectSelector = (s: Data) => s.appState.activeTool === 'select'