File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 11<script setup lang="ts">
2- import { DEFAULT_ACCENT_COLOR_OPTION_ID , useAccentColor } from ' ~/composables/useSettings'
2+ import { useAccentColor } from ' ~/composables/useSettings'
33
44const { accentColors, selectedAccentColorOptionId, setAccentColor } = useAccentColor ()
55
66onPrehydrate (el => {
77 const settings = JSON .parse (localStorage .getItem (' npmx-settings' ) || ' {}' )
8- const defaultId = DEFAULT_ACCENT_COLOR_OPTION_ID
8+ // Hardcoded — onPrehydrate is serialized into a <script> tag and cannot reference imports
9+ const defaultId = ' neutral'
910 const id = settings .accentColorId ?? defaultId
1011 if (id ) {
1112 const input = el .querySelector <HTMLInputElement >(` input[value="${id }"] ` )
Original file line number Diff line number Diff line change 11<script setup lang="ts">
2- import { DEFAULT_BACKGROUND_THEME_OPTION_ID , useBackgroundTheme } from ' ~/composables/useSettings'
3-
42const { backgroundThemes, selectedBackgroundThemeOptionId, setBackgroundTheme } =
53 useBackgroundTheme ()
64
75onPrehydrate (el => {
86 const settings = JSON .parse (localStorage .getItem (' npmx-settings' ) || ' {}' )
9- const defaultId = DEFAULT_BACKGROUND_THEME_OPTION_ID
7+ // Hardcoded — onPrehydrate is serialized into a <script> tag and cannot reference imports
8+ const defaultId = ' neutral'
109 const id = settings .preferredBackgroundTheme ?? defaultId
1110 if (id ) {
1211 const input = el .querySelector <HTMLInputElement >(` input[value="${id }"] ` )
You can’t perform that action at this time.
0 commit comments