mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 17:19:37 +02:00
toggleSymbolPalette now in useEditorPropertiesContext
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import { useEditorContext } from '../../../shared/context/editor-context'
|
||||
import { useEditorPropertiesContext } from '@/features/ide-react/context/editor-properties-context'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import PropTypes from 'prop-types'
|
||||
|
||||
export default function SymbolPaletteCloseButton() {
|
||||
const { toggleSymbolPalette } = useEditorContext()
|
||||
const { toggleSymbolPalette } = useEditorPropertiesContext()
|
||||
const { t } = useTranslation()
|
||||
|
||||
const handleClick = () => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { useCallback, useEffect, useRef, useState } from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import { useEditorContext } from '../../../shared/context/editor-context'
|
||||
import { useEditorPropertiesContext } from '@/features/ide-react/context/editor-properties-context'
|
||||
import SymbolPaletteItem from './symbol-palette-item'
|
||||
|
||||
export default function SymbolPaletteItems({
|
||||
@@ -19,7 +19,7 @@ export default function SymbolPaletteItems({
|
||||
const getItemRects = () => {
|
||||
return itemRefs.current.map(ref => ref?.getBoundingClientRect?.() ?? null)
|
||||
}
|
||||
const { toggleSymbolPalette } = useEditorContext()
|
||||
const { toggleSymbolPalette } = useEditorPropertiesContext()
|
||||
|
||||
const handleKeyDown = useCallback(
|
||||
event => {
|
||||
|
||||
Reference in New Issue
Block a user