"use client"; import { useI18n } from "@/components/I18nProvider"; import { useState } from "react"; import { api } from "./StartGame"; export function Pairing({ code }: { code: string }) { const { t } = useI18n(); const [message, setMessage] = useState(""), [busy, setBusy] = useState(false); async function approve() { setBusy(true); try { await api("pairing/approve", { code }); setMessage("Capture client linked. You can return to Minecraft."); } catch (e) { setMessage((e as Error).message); } finally { setBusy(false); } } return (
{t("LINK YOUR CAPTURE CLIENT")}

{code}

{t( "Approve only if this code is displayed by your MineGeo Fabric mod. Linking lets that client upload private map drafts to your account.", )}

{message && (

{t(message)}

)}
); }