toggleSymbolPalette now in useEditorPropertiesContext

This commit is contained in:
yu-i-i
2025-07-18 00:34:25 +02:00
parent 03af4d94df
commit 212552a613
2 changed files with 4 additions and 4 deletions

View File

@@ -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 = () => {

View File

@@ -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 => {