diff --git a/Frontend/config.json b/Frontend/config.json index 7f0bf66..4f5f8d9 100644 --- a/Frontend/config.json +++ b/Frontend/config.json @@ -34,5 +34,19 @@ "Server": "/player", "Mojang": "/mojang", "Docs": "/docs" - } + }, + "featuredItems": [ + { + "name": "Player Lookup", + "description": "Wanna find a player? You can locate them here by their username or UUID.", + "image": "/media/featured/server.png", + "href": "/player" + }, + { + "name": "Server Lookup", + "description": "Fugiat culpa est consequat nostrud exercitation ut id ex in.", + "image": "/media/featured/server.png", + "href": "/player" + } + ] } diff --git a/Frontend/src/app/(pages)/docs/page.tsx b/Frontend/src/app/(pages)/docs/page.tsx index bb638bd..a5a51a2 100644 --- a/Frontend/src/app/(pages)/docs/page.tsx +++ b/Frontend/src/app/(pages)/docs/page.tsx @@ -1,7 +1,7 @@ import Creeper from "@/components/creeper"; import { minecrafter } from "@/font/fonts"; +import { cn } from "@/lib/utils"; import Link from "next/link"; -import { cn } from "../../lib/utils"; /** * The documentation page. diff --git a/Frontend/src/app/components/landing/featured-content.tsx b/Frontend/src/app/components/landing/featured-content.tsx index 4958536..e669acc 100644 --- a/Frontend/src/app/components/landing/featured-content.tsx +++ b/Frontend/src/app/components/landing/featured-content.tsx @@ -1,35 +1,41 @@ +import config from "@/config"; import { minecrafter } from "@/font/fonts"; import { cn } from "@/lib/utils"; +import { FeaturedItemProps } from "@/types/config"; import Link from "next/link"; +/** + * The featured content component. + * + * @returns the featured content jsx + */ const FeaturedContent = (): JSX.Element => (
-
- +
+ {config.featuredItems.map((item, index) => ( + + ))}
); +/** + * A featured item component. + * + * @param props the item props + * @returns the item jsx + */ const FeaturedItem = ({ name, description, image, href, -}: { - name: string; - description: string; - image: string; - href: string; -}): JSX.Element => ( +}: FeaturedItemProps): JSX.Element => (