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:
kangfenmao 2025-10-18 18:42:29 +08:00
parent d2b6433609
commit b08228bdb5

View File

@ -1,6 +1,6 @@
import { usePreference } from '@data/hooks/usePreference'
import App from '@renderer/components/MinApp/MinApp'
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 type { FC } from 'react'
import { useMemo } from 'react'
@ -11,7 +11,7 @@ import styled from 'styled-components'
const LaunchpadPage: FC = () => {
const navigate = useNavigate()
const { t } = useTranslation()
const [defaultPaintingProvider] = usePreference('topic.position')
const { defaultPaintingProvider } = useSettings()
const { pinned, openedKeepAliveMinapps } = useMinapps()
const appMenuItems = [