import { $currentPage } from "@/scripts/currentPage" import type { ComponentProps, ParentComponent } from "solid-js"; import { splitProps } from "solid-js"; type RequireProps = { href: string, }; const PageLink: ParentComponent & RequireProps> = (props) => { const [local, others] = splitProps(props, ["children"]); return ( $currentPage.set(others.href)}> {local.children} ); }; export default PageLink;