From 77d111650aa6c974528642ad00558a9cc5259ca6 Mon Sep 17 00:00:00 2001 From: Carlos Valente Date: Fri, 24 May 2024 09:42:15 +0200 Subject: [PATCH] refactor: reduce scope of context --- apps/client/src/App.tsx | 5 +---- .../src/common/components/context-menu/ContextMenu.tsx | 1 + apps/client/src/features/rundown/RundownExport.tsx | 5 ++++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/apps/client/src/App.tsx b/apps/client/src/App.tsx index e342c66c0..e929b66a5 100644 --- a/apps/client/src/App.tsx +++ b/apps/client/src/App.tsx @@ -3,7 +3,6 @@ import { ChakraProvider } from '@chakra-ui/react'; import { QueryClientProvider } from '@tanstack/react-query'; import { ReactQueryDevtools } from '@tanstack/react-query-devtools'; -import { ContextMenu } from './common/components/context-menu/ContextMenu'; import ErrorBoundary from './common/components/error-boundary/ErrorBoundary'; import { AppContextProvider } from './common/context/AppContext'; import { ontimeQueryClient } from './common/queryClient'; @@ -25,9 +24,7 @@ function App() {
- - - + diff --git a/apps/client/src/common/components/context-menu/ContextMenu.tsx b/apps/client/src/common/components/context-menu/ContextMenu.tsx index 56e024f7d..15dd20578 100644 --- a/apps/client/src/common/components/context-menu/ContextMenu.tsx +++ b/apps/client/src/common/components/context-menu/ContextMenu.tsx @@ -75,6 +75,7 @@ export const ContextMenu = ({ children }: ContextMenuProps) => { w={1} h={1} style={{ + position: 'fixed', left: coords.x, top: coords.y, }} diff --git a/apps/client/src/features/rundown/RundownExport.tsx b/apps/client/src/features/rundown/RundownExport.tsx index acd8acdb4..dea4dcf7b 100644 --- a/apps/client/src/features/rundown/RundownExport.tsx +++ b/apps/client/src/features/rundown/RundownExport.tsx @@ -1,6 +1,7 @@ import { memo } from 'react'; import { IoArrowUp } from '@react-icons/all-files/io5/IoArrowUp'; +import { ContextMenu } from '../../common/components/context-menu/ContextMenu'; import ErrorBoundary from '../../common/components/error-boundary/ErrorBoundary'; import { handleLinks } from '../../common/utils/linkUtils'; import { cx } from '../../common/utils/styleUtils'; @@ -21,7 +22,9 @@ const RundownExport = () => {
{!isExtracted && handleLinks(event, 'rundown')} />} - + + +