import van from "vanjs-core"; import { A } from "@vanjs/router"; export const route = { preload: async () => { // in most cases you may want to enforce user access control console.log("Admin Layout preload triggered"); }, load: async () => { // Load data if needed // you might want to cache this data console.log("Admin Layout load triggered"); }, }; export const Layout = (props?: { children?: JSX.Element }) => { const open = van.state(false); const onOpenChange = () => { const current = open.val; open.val = !current; }; return [ <>