This commit is contained in:
IndieKKY
2024-10-06 19:16:22 +08:00
parent 9bcf6ee48d
commit 2460b0b822
12 changed files with 32 additions and 25 deletions

View File

@@ -27,6 +27,7 @@ import toast from 'react-hot-toast'
import {useBoolean, useEventTarget} from 'ahooks'
import {useEventChecked} from '@kky002/kky-hooks'
import useMessaging from '@/messaging/layer2/useMessaging'
import { useMessage } from '@/hooks/message'
const Section = (props: {
title: ShowElement
@@ -58,7 +59,7 @@ const FormItem = (props: {
const OptionsPage = () => {
const dispatch = useAppDispatch()
const envData = useAppSelector(state => state.env.envData)
const {sendExtension} = useMessaging()
const {sendExtension} = useMessage()
const {value: sidePanelValue, onChange: setSidePanelValue} = useEventChecked(envData.sidePanel)
const {value: autoInsertValue, onChange: setAutoInsertValue} = useEventChecked(!envData.manualInsert)
const {value: autoExpandValue, onChange: setAutoExpandValue} = useEventChecked(envData.autoExpand)