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

View File

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