mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-03 19:30:04 +08:00
Merge branch 'main' of github.com:CherryHQ/cherry-studio into v2
This commit is contained in:
commit
32f41391c4
@ -1,6 +1,5 @@
|
|||||||
import '@renderer/databases'
|
import '@renderer/databases'
|
||||||
|
|
||||||
import { HeroUIProvider } from '@heroui/react'
|
|
||||||
import { preferenceService } from '@data/PreferenceService'
|
import { preferenceService } from '@data/PreferenceService'
|
||||||
import { loggerService } from '@logger'
|
import { loggerService } from '@logger'
|
||||||
import store, { persistor } from '@renderer/store'
|
import store, { persistor } from '@renderer/store'
|
||||||
@ -12,6 +11,7 @@ import { ToastPortal } from './components/ToastPortal'
|
|||||||
import TopViewContainer from './components/TopView'
|
import TopViewContainer from './components/TopView'
|
||||||
import AntdProvider from './context/AntdProvider'
|
import AntdProvider from './context/AntdProvider'
|
||||||
import { CodeStyleProvider } from './context/CodeStyleProvider'
|
import { CodeStyleProvider } from './context/CodeStyleProvider'
|
||||||
|
import { HeroUIProvider } from './context/HeroUIProvider'
|
||||||
import { NotificationProvider } from './context/NotificationProvider'
|
import { NotificationProvider } from './context/NotificationProvider'
|
||||||
import StyleSheetManager from './context/StyleSheetManager'
|
import StyleSheetManager from './context/StyleSheetManager'
|
||||||
import { ThemeProvider } from './context/ThemeProvider'
|
import { ThemeProvider } from './context/ThemeProvider'
|
||||||
@ -37,7 +37,7 @@ function App(): React.ReactElement {
|
|||||||
return (
|
return (
|
||||||
<Provider store={store}>
|
<Provider store={store}>
|
||||||
<QueryClientProvider client={queryClient}>
|
<QueryClientProvider client={queryClient}>
|
||||||
<HeroUIProvider className="flex h-full w-full flex-1">
|
<HeroUIProvider>
|
||||||
<StyleSheetManager>
|
<StyleSheetManager>
|
||||||
<ThemeProvider>
|
<ThemeProvider>
|
||||||
<AntdProvider>
|
<AntdProvider>
|
||||||
|
|||||||
13
src/renderer/src/context/HeroUIProvider.tsx
Normal file
13
src/renderer/src/context/HeroUIProvider.tsx
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
import { HeroUIProvider } from '@heroui/react'
|
||||||
|
import { useSettings } from '@renderer/hooks/useSettings'
|
||||||
|
|
||||||
|
const AppHeroUIProvider: React.FC<{ children: React.ReactNode }> = ({ children }) => {
|
||||||
|
const { language } = useSettings()
|
||||||
|
return (
|
||||||
|
<HeroUIProvider className="flex h-full w-full flex-1" locale={language}>
|
||||||
|
{children}
|
||||||
|
</HeroUIProvider>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export { AppHeroUIProvider as HeroUIProvider }
|
||||||
Loading…
Reference in New Issue
Block a user