/* * MHSF, Minehut Server List * All external content is rather licensed under the ECA Agreement * located here: https://mhsf.app/docs/legal/external-content-agreement * * All code under MHSF is licensed under the MIT License * by open source contributors * * Copyright (c) 2025 dvelo * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to * deal in the Software without restriction, including without limitation the * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or * sell copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. */ import { Material } from "@/components/ui/material"; import { Separator } from "@/components/ui/separator"; import type { useMHSFServer } from "@/lib/hooks/use-mhsf-server"; import type { ServerResponse } from "@/lib/types/mh-server"; import { getIndexFromRarity } from "@/lib/types/server-icon"; import IconDisplay from "../../icons/minecraft-icon-display"; import { Tooltip, TooltipContent, TooltipTrigger, } from "@/components/ui/tooltip"; import { Banknote, Info, X } from "lucide-react"; import { useIcons } from "@/lib/hooks/use-icons"; import { Placeholder } from "@/components/ui/placeholder"; export function IconsRow({ server, mhsfData, }: { server: ServerResponse; mhsfData: ReturnType }) { const { icons } = useIcons(); return (
Purchased Icons Purchased Icons are icons that are under the server's ownership,
they may or may not available at that certain moment either.
{server?.purchased_icons.length === 0 && } title="We couldn't find any icons" description="Maybe shake the box harder?" className="mt-4" />} {server?.purchased_icons.map((icon, i) => (

c._id === icon)?.rank.toLowerCase(), ).text, }} >

c._id === icon)?.icon_name ?? "", }} className="mr-2" /> {icons?.find((c) => c._id === icon)?.display_name} Just because an item is available, it doesn't directly
mean that it can be bought immediately, it just means its in the{" "}
pool of icons that are in the weekly rotation.

Available currently: {icons?.find((c) => c._id === icon)?.available ? "Yes" : "No"} Disabled currently: {icons?.find((c) => c._id === icon)?.disabled ? "Yes" : "No"} Price: {icons?.find((c) => c._id === icon)?.price} credits
c._id === icon)?.rank.toLowerCase(), ).bg, }} > {icons?.find((c) => c._id === icon)?.rank.toLocaleUpperCase()}

))}
); }