Webview: add clanList edit

This commit is contained in:
Johannes Kirschbauer
2024-07-11 18:45:29 +02:00
parent 3736f492d3
commit ba8a9c7565
3 changed files with 82 additions and 65 deletions

View File

@@ -1,17 +1,13 @@
import { Component, JSXElement, Show } from "solid-js";
import { Header } from "./header";
import { Sidebar } from "../Sidebar";
import { route, setRoute } from "../App";
import { effect } from "solid-js/web";
import { clanList, route, setRoute } from "../App";
interface LayoutProps {
children: JSXElement;
}
export const Layout: Component<LayoutProps> = (props) => {
effect(() => {
console.log(route());
});
return (
<>
<div class="drawer bg-base-100 lg:drawer-open">
@@ -24,12 +20,13 @@ export const Layout: Component<LayoutProps> = (props) => {
<Show when={route() !== "welcome"}>
<Header />
</Show>
{props.children}
</div>
<div
class="drawer-side z-40"
classList={{ "!hidden": route() === "welcome" }}
classList={{
"!hidden": route() === "welcome" || clanList().length === 0,
}}
>
<label
for="toplevel-drawer"