mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-24 10:40:07 +08:00
15 lines
460 B
TypeScript
15 lines
460 B
TypeScript
import { useAppDispatch, useAppSelector } from '@renderer/store'
|
|
import { setSendMessageShortcut as _setSendMessageShortcut, SendMessageShortcut } from '@renderer/store/settings'
|
|
|
|
export function useSettings() {
|
|
const settings = useAppSelector((state) => state.settings)
|
|
const dispatch = useAppDispatch()
|
|
|
|
return {
|
|
...settings,
|
|
setSendMessageShortcut(shortcut: SendMessageShortcut) {
|
|
dispatch(_setSendMessageShortcut(shortcut))
|
|
}
|
|
}
|
|
}
|