diff --git a/src/components/AfterServerView.tsx b/src/components/AfterServerView.tsx index 0b1b7b5..d64f057 100644 --- a/src/components/AfterServerView.tsx +++ b/src/components/AfterServerView.tsx @@ -32,13 +32,19 @@ import { getCommunityServerFavorites, getCustomization } from "@/lib/api"; import { MHSF } from "@/lib/mhsf"; import { ServerResponse } from "@/lib/types/mh-server"; -import { MinehutIcon, getMinehutIcons } from "@/lib/types/server-icon"; +import { + MinehutIcon, + getIndexFromRarity, + getMinehutIcons, + rarityIndex, +} from "@/lib/types/server-icon"; import { Copy, Info } from "lucide-react"; import { useTheme } from "next-themes"; import { useEffect, useState } from "react"; import FadeIn from "react-fade-in/lib/FadeIn"; import toast, { CheckmarkIcon } from "react-hot-toast"; import Markdown from "react-markdown"; +import IconDisplay from "./IconDisplay"; import AchievementList from "./feat/AchievementList"; import { Button } from "./ui/button"; import { @@ -74,13 +80,13 @@ export default function AfterServerView({ server }: { server: string }) { getCommunityServerFavorites(server).then((c) => { mhsf.setFavorites(c); }); - getMinehutIcons().then((i) => { - setIcons(i); - }); } fetch("https://api.minehut.com/server/" + server + "?byName=true").then( (c) => c.json().then((n) => setServerObject(n.server)), ); + getMinehutIcons().then((i) => { + setIcons(i); + }); setLoading(false); }); }, []); @@ -411,16 +417,47 @@ export default function AfterServerView({ server }: { server: string }) { )} {view == "icons" && ( -
Purchased Icons are icons that are under the server's ownership, they may or may not available at that certain moment either.
{serverObject?.purchased_icons.map((icon) => ( -