Skip to content
Closed

Dev #27

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ export default async function RootLayout({
children: React.ReactNode
}) {
const config = await getConfig()
const hasCustomFont = config.settings.advanced.customCSS.includes('font-family')
const customCSS = config.settings.advanced?.customCSS || ''
const hasCustomFont = typeof customCSS === 'string' ? customCSS.includes('font-family') : false

if (config.settings.appearance.favicon) {
metadata.icons = {
Expand All @@ -79,7 +80,7 @@ export default async function RootLayout({
}

return (
<html lang="en" data-theme={userTheme ?? config.settings.appearance.systemThemes} suppressHydrationWarning>
<html lang="en" data-theme={userTheme ?? config.settings.appearance.theme} suppressHydrationWarning>
<head>
<meta charSet="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
Expand All @@ -97,7 +98,7 @@ export default async function RootLayout({
<ThemeProviderWrapper
initialUserTheme={userTheme}
initialUserColors={userCustomColors}
systemTheme={config.settings.appearance.systemThemes}
systemTheme={config.settings.appearance.theme}
systemColors={config.settings.appearance.customColors}
>
<Snowfall />
Expand Down
1 change: 1 addition & 0 deletions packages/lib/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ export const DEFAULT_CONFIG: EmberlyConfig = {
input: '217.2 32.6% 17.5%',
ring: '212.7 26.8% 83.9%',
},
systemThemes: {},
},
advanced: {
customCSS: '',
Expand Down
Loading