MCPcopy Create free account
hub / github.com/AmazingAng/PolyWorld / SourcesTab

Function SourcesTab

src/components/SettingsModal.tsx:394–424  ·  view source on GitHub ↗
({
  dataMode,
  lastSyncTime,
}: {
  dataMode: "live" | "sample";
  lastSyncTime: string | null;
})

Source from the content-addressed store, hash-verified

392
393/* ─── Tab: SOURCES ─── */
394function SourcesTab({
395 dataMode,
396 lastSyncTime,
397}: {
398 dataMode: "live" | "sample";
399 lastSyncTime: string | null;
400}) {
401 const { t } = useI18n();
402 return (
403 <div>
404 <div className="settings-section">
405 <span className="section-label">{t("settings.dataSource")}</span>
406 <div className="settings-info-grid">
407 <InfoRow label={t("settings.provider")} value="Polymarket Gamma API" />
408 <InfoRow label={t("settings.endpoint")} value="/api/markets" />
409 <InfoRow
410 label={t("settings.dataMode")}
411 value={dataMode}
412 color={dataMode === "live" ? "var(--green)" : "var(--yellow)"}
413 />
414 <InfoRow
415 label={t("settings.lastSync")}
416 value={lastSyncTime ? new Date(lastSyncTime).toLocaleTimeString("en-US") : "—"}
417 />
418 <InfoRow label={t("settings.refreshInterval")} value="45s" />
419 <InfoRow label={t("settings.hlsStreams")} value={String(STREAMS.length)} />
420 </div>
421 </div>
422 </div>
423 );
424}
425
426/* ─── Tab: SYSTEM STATUS ─── */
427function SystemTab({

Callers

nothing calls this directly

Calls 1

useI18nFunction · 0.90

Tested by

no test coverage detected