import { Box, Flex, Heading, Text, Button, Wrap, WrapItem, } from "@chakra-ui/react"; import type { FunctionComponent } from "react"; import { HOME_ANALYTICS, SECTION_PADDING } from "./constants"; import testIds from "./testIds"; import { Category } from "../../api/config"; import { NavLink } from "../../components/NavLink"; import { useConfigValue } from "../../hooks/useConfigValue"; import { getSearchPath } from "../../util/url"; /** * Categories used if config does not have specific categories */ const DEFAULT_CATEGORIES: Category[] = [ { title: "Monitoring", url: getSearchPath({ keywords: ["monitoring"] }) }, { title: "Containers", url: getSearchPath({ keywords: ["containers"] }) }, { title: "Serverless", url: getSearchPath({ keywords: ["serverless"] }) }, { title: "Databases", url: getSearchPath({ keywords: ["databases"] }) }, { title: "Utilities", url: getSearchPath({ keywords: ["utilities"] }) }, { title: "Deployment", url: getSearchPath({ keywords: ["deployment"] }) }, { title: "Websites", url: getSearchPath({ keywords: ["websites"] }) }, { title: "Security", url: getSearchPath({ keywords: ["security"] }) }, { title: "Compliance", url: getSearchPath({ keywords: ["compliance"] }) }, { title: "Network", url: getSearchPath({ keywords: ["network"] }) }, { title: "Artificial Intelligence (AI)", url: getSearchPath({ keywords: ["artificial intelligence (ai)"] }), }, { title: "Cloud Services Integrations", url: getSearchPath({ keywords: ["cloud services integrations"] }), }, ]; export const Categories: FunctionComponent = () => { const categories = useConfigValue("categories") ?? DEFAULT_CATEGORIES; return ( Search by use case Find the right construct for your problem set from a community that’s already tackled it. {categories.map((category) => ( ))} ); };