feat: Themes added, 4 themes available (3 dark, 1 light)
This commit is contained in:
@@ -4,6 +4,7 @@ import './style.css'
|
||||
import App from './App'
|
||||
import { syncPortablePrefs } from './lib/uiPref'
|
||||
import { I18nProvider } from './lib/i18n'
|
||||
import { ThemeProvider, initTheme } from './lib/theme'
|
||||
|
||||
const container = document.getElementById('root')
|
||||
|
||||
@@ -13,10 +14,15 @@ const root = createRoot(container!)
|
||||
// app's synchronous reads see the values copied along with the data/ folder.
|
||||
// Render regardless of the outcome so a backend hiccup never blocks startup.
|
||||
syncPortablePrefs().finally(() => {
|
||||
// Stamp the persisted theme onto <html> before render so the correct
|
||||
// palette is applied immediately (portable pref hydrated just above).
|
||||
initTheme()
|
||||
root.render(
|
||||
<React.StrictMode>
|
||||
<I18nProvider>
|
||||
<App/>
|
||||
<ThemeProvider>
|
||||
<App/>
|
||||
</ThemeProvider>
|
||||
</I18nProvider>
|
||||
</React.StrictMode>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user