diff --git a/apps/www/src/components/feat/embeds/embed.tsx b/apps/www/src/components/feat/embeds/embed.tsx index 05954d1..3a037b0 100644 --- a/apps/www/src/components/feat/embeds/embed.tsx +++ b/apps/www/src/components/feat/embeds/embed.tsx @@ -32,11 +32,10 @@ import IconDisplay from "@/components/feat/icons/minecraft-icon-display"; import { Badge } from "@/components/ui/badge"; import type { ServerResponse } from "@/lib/types/mh-server"; -import { Copy, ExternalLink, ServerCrash } from "lucide-react"; +import { Check, Copy, ExternalLink, ServerCrash } from "lucide-react"; import { notFound, useSearchParams } from "next/navigation"; import { useEffect, useState } from "react"; import { Button } from "@/components/ui/button"; -import { CheckmarkIcon } from "react-hot-toast"; import useClipboard from "@/lib/useClipboard"; import { Tooltip, @@ -46,6 +45,7 @@ import { import { Spinner } from "@/components/ui/spinner"; import { cn } from "@/lib/utils"; import Link from "next/link"; +import { AnimatePresence, motion } from "framer-motion"; export default function Embed({ params }: { params: { server: string } }) { const [serverFound, setServerFound] = useState(true); @@ -97,7 +97,14 @@ export default function Embed({ params }: { params: { server: string } }) {
-
+
Copy this server IP @@ -126,49 +161,55 @@ export default function Embed({ params }: { params: { server: string } }) {
- {serverObject && ( - - )} - -
- - {params.server} - {!noShowBranding && on Minehut} - {" "} - Joined {serverObject?.joins} times - {serverObject?.online && ( - - {serverObject.playerCount === 0 ? ( -
- ) : ( -
- )} - - {serverObject.playerCount} player(s) online - - +
+ {serverObject && ( + + )} +
+ + {params.server} + {!noShowBranding && on Minehut} + + Joined {serverObject?.joins} times + {serverObject?.online && ( + + {serverObject.playerCount === 0 ? ( +
+ ) : ( +
+ )} + + {serverObject.playerCount} player(s) online + + + )} +
diff --git a/apps/www/src/components/ui/tooltip.tsx b/apps/www/src/components/ui/tooltip.tsx index 541bc6c..11658e8 100644 --- a/apps/www/src/components/ui/tooltip.tsx +++ b/apps/www/src/components/ui/tooltip.tsx @@ -20,7 +20,7 @@ const TooltipContent = React.forwardRef< ref={ref} sideOffset={sideOffset} className={cn( - "z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", + "z-50 overflow-hidden rounded-md bg-shadcn-primary px-3 py-1.5 text-xs text-shadcn-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", "border dark:border-slate-200 border-zinc-800 dark:border-b-slate-300 border-t-zinc-700", className )}