Persist window paths

This commit is contained in:
Gregory Schier
2023-10-28 21:23:46 -07:00
parent cca8d97d63
commit 30e7f7ccfe
5 changed files with 38 additions and 8 deletions

View File

@@ -4,10 +4,17 @@ import { App } from './components/App';
import { getKeyValue } from './lib/keyValueStore';
import { getPreferredAppearance, setAppearance } from './lib/theme/window';
import './main.css';
import { initPathnamePersistance } from './lib/initPathnamePersistance';
setAppearance(await getKeyValue({ key: 'appearance', fallback: getPreferredAppearance() }));
await initPathnamePersistance();
setAppearance(
await getKeyValue({
key: 'appearance',
fallback: getPreferredAppearance(),
}),
);
// root holds our app's root DOM Element:
createRoot(document.getElementById('root') as HTMLElement).render(
<StrictMode>
<App />