import { splitProps, type JSX } from "solid-js"; import { useNavigator } from "./StackedRouter"; import { useResolvedPath } from "@solidjs/router"; function handleClick( push: (name: string, state: unknown) => void, event: MouseEvent & { currentTarget: HTMLAnchorElement }, ) { const target = event.currentTarget; event.preventDefault(); push(target.href, { state: target.getAttribute("state") || undefined }); } const A = (oprops: Omit) => { const [props, rest] = splitProps(oprops, ["href"]); const resolvedPath = useResolvedPath(() => props.href || "#"); const { push } = useNavigator(); return ; }; export default A;