chore: update dependencies
This commit is contained in:
parent
576697c5d0
commit
05416af197
14 changed files with 1371 additions and 640 deletions
|
@ -1,9 +1,13 @@
|
|||
/* @refresh reload */
|
||||
import { MetaProvider } from "@solidjs/meta";
|
||||
import { Router } from "@solidjs/router";
|
||||
import { Router, useNavigate } 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");
|
||||
|
||||
|
@ -19,18 +23,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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue