import Link from "next/link"; import { useRouter } from "next/router"; import { Fragment } from "react"; import { ComponentType } from "react"; import styles from "./Links.module.css"; const cn = (...cl: string[]) => cl.join(" "); interface LinkInfo { href: string; title: string; } const mainLinks: LinkInfo[] = [ { href: "https://bbcni.github.io/Interminimal/", title: "Documentation" }, { href: "https://github.com/BBCNI/Interminimal", title: "GitHub" }, { href: "https://www.npmjs.com/package/interminimal", title: "NPM" }, { href: "https://github.com/BBCNI/Interminimal/blob/main/demo", title: "Demo App Source" } ]; const demoLinks: LinkInfo[] = [ { href: "/", title: "Playground" }, { href: "/calculator", title: "Calculator" } ]; const LinkList: ComponentType<{ links: LinkInfo[] }> = ({ links }) => { const router = useRouter(); const activeClass = (link: LinkInfo) => link.href === router.pathname ? styles.active : ""; return ( ); }; export const Links: ComponentType = () => { return (
); };