fix: Fix themes not loading properly causing the entire program to break
This commit is contained in:
parent
ea24c96a79
commit
1906e29bee
2 changed files with 11 additions and 14 deletions
|
|
@ -1,6 +1,5 @@
|
|||
import { getProgramInfo } from '@onelauncher/client';
|
||||
import AnimatedRoutes from '~ui/components/AnimatedRoutes';
|
||||
import ErrorBoundary from '~ui/components/ErrorBoundary';
|
||||
import { NotificationProvider } from '~ui/hooks/useNotifications';
|
||||
import { onMount, type ParentProps } from 'solid-js';
|
||||
import { MultiProvider } from './ui/components/MultiProvider';
|
||||
|
|
@ -19,20 +18,18 @@ function RootLayout(props: ParentProps) {
|
|||
});
|
||||
|
||||
return (
|
||||
<ErrorBoundary>
|
||||
<GlobalContexts>
|
||||
<main class="h-screen max-h-screen min-h-screen w-full flex flex-col overflow-hidden bg-page text-fg-primary">
|
||||
<WindowFrame />
|
||||
<GlobalContexts>
|
||||
<main class="h-screen max-h-screen min-h-screen w-full flex flex-col overflow-hidden bg-page text-fg-primary">
|
||||
<WindowFrame />
|
||||
|
||||
<AnimatedRoutes animation="fade" appear>
|
||||
{props.children}
|
||||
</AnimatedRoutes>
|
||||
<AnimatedRoutes animation="fade" appear>
|
||||
{props.children}
|
||||
</AnimatedRoutes>
|
||||
|
||||
<NotificationOverlay />
|
||||
<ModalRenderer />
|
||||
</main>
|
||||
</GlobalContexts>
|
||||
</ErrorBoundary>
|
||||
<NotificationOverlay />
|
||||
<ModalRenderer />
|
||||
</main>
|
||||
</GlobalContexts>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ export function splitMergedTheme(merged: string): {
|
|||
} {
|
||||
const [name, ...variants] = merged.split('-');
|
||||
|
||||
const foundVariant = THEMES[name as keyof typeof THEMES].variants.find(variant => variant.name === variants.join('-'));
|
||||
const foundVariant = THEMES[name as keyof typeof THEMES]?.variants.find(variant => variant.name === variants.join('-')) ?? undefined;
|
||||
|
||||
if (!name || !foundVariant)
|
||||
return {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue