Skip to content

Commit 924f2a5

Browse files
committed
wip
1 parent c0eb9dc commit 924f2a5

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/ui/layout/theme-selector.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,17 +90,15 @@ export const ThemeSelector: Component = () => {
9090
};
9191

9292
function RefreshOnMount(props: ComponentProps<"div">) {
93-
const resolved = children(() => props.children);
94-
9593
// incorrect value on server with no runtime, refresh on mount to update possibly incorrect label
9694
const [refresh, setRefresh] = createSignal(false);
9795
onMount(() => {
9896
setRefresh(true);
9997
});
10098

10199
return (
102-
<Show when={refresh()} fallback={<div {...props}><div>{resolved()}</div></div>} keyed>
103-
<div {...props}>{resolved()}</div>
100+
<Show when={refresh()} fallback={<div {...props}><div>{props.children}</div></div>} keyed>
101+
<div {...props}>{props.children}</div>
104102
</Show>
105103
);
106104
}

0 commit comments

Comments
 (0)