/* global React */ const { useState, useEffect } = React; // ============================================================ // PUBLISH MODAL // // Publishing is NOT something the leaderboard can do on its own. // `POST /api/v1/sessions/{id}/publish` is owner-gated: it needs a // COMPLETED training session *and* the `X-Session-Token` that was // handed out once when that session was created. That token only // exists in the browser that ran the training: i.e. the Playground // at /dashboard/, never here. // // So this modal routes the user to the real thing instead of // pretending. The previous version rendered a fake form that // reported "submitted · verified" for a hardcoded run (DreamerV3 / // 921 / r_8422) without touching the API: a visitor could "publish" // a run they never trained and see a success screen for it. // ============================================================ const PLAYGROUND_URL = '/dashboard/'; const PublishModal = ({ open, onClose }) => { if (!open) return null; const go = () => { window.location.href = PLAYGROUND_URL; }; return (