Give Sokko TCG's interface files headers that explain their role, callers and pitfalls

Document the page, API client, offline cache, card renderer, quest pages and
admin dashboard: how stale responses are ignored, where the CSRF token lives,
which requests are idempotent and what the admin checks really protect. Fix
the Broken Mirror headers that still described two levels instead of three,
and the cards README that still described the stale-response bug as open.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Shinuwa 2026-12-01 09:56:58 +01:00
parent 73bd5ae21c
commit 34b412d968
21 changed files with 175 additions and 42 deletions

View file

@ -1,5 +1,10 @@
/**
* @file Détecte la disponibilité de Sokko TCG et partage son catalogue public.
* @file Lit une fois `GET /api/cards/config` : TCG activé ou non, connexion Discord ou de développement disponible,
* catalogue public et contact de confidentialité.
*
* Utilisé par : main.jsx, qui transmet la configuration aux pages (menu, CardsPage, À propos).
* Attention : chaque visite du site lit cette route, même hors du TCG ; `replaceCatalog` remplace le catalogue
* après une modification d'administration, sans relire la configuration.
*/
import { useCallback, useEffect, useState } from "react";