SPB Git forge

spb/groupe-ka

Public

Groupe KA — site du holding + KA ID (compte unique & SSO des 7 plateformes). Next.js 16, SQLite, Google & Apple login.

81commits 1branches 0releases
89.2 MBsize
maindefault branch
22 days agolast push
TypeScript 70.4% HTML 18.4% JavaScript 4% Python 3.8% CSS 3.4%

Fix /compte : PLATFORM_URLS[toit-ka] manquant plantait la page après connexion

La liste « Votre KA ID fonctionne ici » itère sur SSO_CLIENTS et appelait
PLATFORM_URLS[id].replace() — l'ajout du client toit-ka sans URL associée
faisait un 500 SSR sur /compte (TypeError undefined.replace). Ajout de
l'URL + garde .filter() pour qu'un futur client sans URL ne casse plus la page.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Simon-Pierre Boucher committed 1 mo ago (Aug 16, 2026) parent 9888039

1 changed file +4 −1

modified src/app/compte/page.tsx +4 −1
@@ -39,6 +39,7 @@ const PLATFORM_URLS: Record<string, string> = {
39 39 "fabri-ka": "https://www.fabri-ka.com",
40 40 "food-ka": "https://www.food-ka.com",
41 41 "ora-ka": "https://www.ora-ka.com",
42 + "toit-ka": "https://www.toit-ka.com",
42 43 };
43 44
44 45 function fmtDate(iso: string | null): string {
@@ -434,7 +435,9 @@ export default async function Compte() {
434 435 arrivez déjà connecté, avec le même profil et le même KA-ID.
435 436 </p>
436 437 <ul className="mt-5 grid gap-3 sm:grid-cols-2">
437 − {Object.entries(SSO_CLIENTS).map(([id, c]) => (
438 + {Object.entries(SSO_CLIENTS)
439 + .filter(([id]) => PLATFORM_URLS[id])
440 + .map(([id, c]) => (
438 441 <li key={id}>
439 442 <a
440 443 href={PLATFORM_URLS[id]}
441 444