import { MetaProvider, Title } from "@solidjs/meta"
import { A, Router, useLocation } from "@solidjs/router"
import { FileRoutes } from "@solidjs/start/router"
import { dataAttr } from "@zag-js/dom-query"
import { componentRoutesData, getComponentByPath, isKnownComponent } from "@zag-js/shared"
import "@zag-js/shared/src/style.css"
import { For, Suspense, onMount } from "solid-js"
export default function App() {
return (
{
const location = useLocation()
const currentComponent = () => {
const pathname = location.pathname.split("?")[0] || "/"
const pathnameComponent = pathname.split("/").filter(Boolean)[0] ?? ""
return getComponentByPath(pathname) ?? (isKnownComponent(pathnameComponent) ? pathnameComponent : "")
}
return (
Zag.js + Solid
}>
{(component) => (
{component.label}
)}
{props.children}
)
}}
>
)
}
// e2e waits for this before interacting
function Ready() {
onMount(() => {
document.documentElement.dataset.ready = ""
})
return null
}