"use client"; import { Placeholder } from "@/components/ui/placeholder"; import { Spinner } from "@/components/ui/spinner"; import { useServer } from "@/lib/hooks/use-server"; import type { OnlineServer } from "@/lib/types/mh-server"; import { X } from "lucide-react"; import { ServerMainPage } from "./server-page"; export function ServerProvider({ serverId }: { serverId: string }) { const { server, error, loading } = useServer({ id: serverId }); if (loading) return (
); if (error !== null) return (
} title="Error while fetching server" description={ <> Try again later
If this occurs again, please contact support or make a GitHub issue.
{error} } />
); return (
); }