import { LoaderIcon } from "@lume/icons"; import { NIP11 } from "@lume/types"; import { User } from "@lume/ui"; import { Suspense } from "react"; import { useTranslation } from "react-i18next"; import { Await, useLoaderData, useParams } from "react-router-dom"; import { RelayEventList } from "./components/relayEventList"; export function RelayUrlScreen() { const { t } = useTranslation(); const { url } = useParams(); const data: { relay?: { [key: string]: string } } = useLoaderData(); const getSoftwareName = (url: string) => { const filename = url.substring(url.lastIndexOf("/") + 1); return filename.replace(".git", ""); }; const titleCase = (s: string) => { return s .replace(/^[-_]*(.)/, (_, c) => c.toUpperCase()) .replace(/[-_]+(.)/g, (_, c) => ` ${c.toUpperCase()}`); }; return (
{t("relays.relayView.empty")}
{resolvedRelay.description}
{titleCase(key)}:
{resolvedRelay.limitation[key].toString()}