import { useRouter } from "next/router"; import { QuadrantList } from "@/components/QuadrantList/QuadrantList"; import { Radar } from "@/components/Radar/Radar"; import { Tags } from "@/components/Tags/Tags"; import { getAppName, getChartConfig, getItems, getQuadrants, getReleases, getRings, getSections, getTags, getToggle, } from "@/lib/data"; import { CustomPage } from "@/pages/_app"; const Home: CustomPage = () => { const router = useRouter(); const tag = router.query.tag as string | undefined; const appName = getAppName(); const chartConfig = getChartConfig(); const sections = getSections(); const version = getReleases().length; const rings = getRings(); const quadrants = getQuadrants(); const tags = getTags(); const items = getItems(undefined, true).filter( (item) => !tag || item.tags?.includes(tag), ); return ( <>

{appName}{" "} Version #{version}

{sections.map((section) => { switch (section) { case "radar": return ( getToggle("showChart") && ( ) ); case "tags": return ( getToggle("showTagFilter") && tags.length > 0 && ( ) ); case "list": return ( getToggle("showQuadrantList") && ( ) ); default: return null; } })} ); }; export default Home;