fix store import

This commit is contained in:
Felix Roos 2023-02-19 23:28:46 +01:00
parent 7716574076
commit 20848aac09
3 changed files with 4 additions and 6 deletions

View file

@ -1,12 +1,9 @@
--- ---
import { pwaInfo } from 'virtual:pwa-info'; import { pwaInfo } from 'virtual:pwa-info';
import '../styles/index.css'; import '../styles/index.css';
import { settings } from '../repl/themes.mjs';
const { BASE_URL } = import.meta.env; const { BASE_URL } = import.meta.env;
const base = BASE_URL; const base = BASE_URL;
const { strudelTheme } = settings;
--- ---
<!-- Global Metadata --> <!-- Global Metadata -->
@ -48,8 +45,9 @@ const { strudelTheme } = settings;
</style> </style>
{pwaInfo && <Fragment set:html={pwaInfo.webManifest.linkTag} />} {pwaInfo && <Fragment set:html={pwaInfo.webManifest.linkTag} />}
<script define:vars={{ settings, strudelTheme }} is:inline type="module"> <script>
import { watch, get } from './store.mjs'; import { settings } from '../repl/themes.mjs';
import { watch, get } from '../store.mjs';
const themeStyle = document.createElement('style'); const themeStyle = document.createElement('style');
themeStyle.id = 'strudel-theme'; themeStyle.id = 'strudel-theme';
document.head.append(themeStyle); document.head.append(themeStyle);

View file

@ -1,6 +1,6 @@
import { useEffect, useState } from 'react'; import { useEffect, useState } from 'react';
// import { useEvent } from '@strudel.cycles/react'; // import { useEvent } from '@strudel.cycles/react';
import * as Store from '../public/store.mjs'; import * as Store from './store.mjs';
import {} from 'react'; import {} from 'react';
function useStore() { function useStore() {