mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-10 23:59:45 +08:00
refactor: update LaunchpadPage to use useSettings hook
- Replaced usePreference with useSettings in LaunchpadPage for improved state management. - This change aligns with recent updates to enhance consistency across components.
This commit is contained in:
parent
d2b6433609
commit
b08228bdb5
@ -1,6 +1,6 @@
|
|||||||
import { usePreference } from '@data/hooks/usePreference'
|
|
||||||
import App from '@renderer/components/MinApp/MinApp'
|
import App from '@renderer/components/MinApp/MinApp'
|
||||||
import { useMinapps } from '@renderer/hooks/useMinapps'
|
import { useMinapps } from '@renderer/hooks/useMinapps'
|
||||||
|
import { useSettings } from '@renderer/hooks/useSettings'
|
||||||
import { Code, FileSearch, Folder, Languages, LayoutGrid, NotepadText, Palette, Sparkle } from 'lucide-react'
|
import { Code, FileSearch, Folder, Languages, LayoutGrid, NotepadText, Palette, Sparkle } from 'lucide-react'
|
||||||
import type { FC } from 'react'
|
import type { FC } from 'react'
|
||||||
import { useMemo } from 'react'
|
import { useMemo } from 'react'
|
||||||
@ -11,7 +11,7 @@ import styled from 'styled-components'
|
|||||||
const LaunchpadPage: FC = () => {
|
const LaunchpadPage: FC = () => {
|
||||||
const navigate = useNavigate()
|
const navigate = useNavigate()
|
||||||
const { t } = useTranslation()
|
const { t } = useTranslation()
|
||||||
const [defaultPaintingProvider] = usePreference('topic.position')
|
const { defaultPaintingProvider } = useSettings()
|
||||||
const { pinned, openedKeepAliveMinapps } = useMinapps()
|
const { pinned, openedKeepAliveMinapps } = useMinapps()
|
||||||
|
|
||||||
const appMenuItems = [
|
const appMenuItems = [
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user