feat(db): sqlite in worker (not working right now)

This commit is contained in:
Samuel 2025-01-20 17:00:57 +01:00
parent 0e1eed664d
commit c9aaf2ecef
12 changed files with 467 additions and 56 deletions

View file

@ -1,13 +1,8 @@
/* @refresh reload */
import { MetaProvider } from "@solidjs/meta";
import { Router, useNavigate } from "@solidjs/router";
import { Router } from "@solidjs/router";
import { render } from "solid-js/web";
import { createEffect, enableScheduling } from "solid-js";
import App from "./App";
import { db } from "./db/db";
enableScheduling();
const root = document.getElementById("root");
@ -23,18 +18,18 @@ if (root) {
<div class="mx-auto max-w-screen-2xl">
<MetaProvider>
<Router
root={(props) => {
const navigate = useNavigate();
const { pathname } = props.location;
// root={(props) => {
// const navigate = useNavigate();
// const { pathname } = props.location;
createEffect(() => {
if (!db && pathname !== "/") {
navigate("/");
}
});
// createEffect(() => {
// if (!db && pathname !== "/") {
// navigate("/");
// }
// });
return props.children;
}}
// return props.children;
// }}
>
<App />
</Router>