🚸 (editor) Remove blocks pointer events only in analytics

This commit is contained in:
Baptiste Arnaud
2024-01-26 10:38:44 +01:00
parent eda0f3920c
commit bd3439bbf6
5 changed files with 21 additions and 2 deletions

View File

@@ -32,6 +32,7 @@ const graphContext = createContext<{
openedItemId?: string
setOpenedItemId: Dispatch<SetStateAction<string | undefined>>
isReadOnly: boolean
isAnalytics: boolean
focusedGroupId?: string
setFocusedGroupId: Dispatch<SetStateAction<string | undefined>>
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -44,9 +45,11 @@ const graphContext = createContext<{
export const GraphProvider = ({
children,
isReadOnly = false,
isAnalytics = false,
}: {
children: ReactNode
isReadOnly?: boolean
isAnalytics?: boolean
}) => {
const [graphPosition, setGraphPosition] = useState(
graphPositionDefaultValue({ x: 0, y: 0 })
@@ -76,6 +79,7 @@ export const GraphProvider = ({
setFocusedGroupId,
setPreviewingBlock,
previewingBlock,
isAnalytics,
}}
>
{children}