SPB Git forge

spb/resto-ka

Public

Resto·Ka — tous les restaurants du Québec, menus complets et prix réels (famille ·Ka)

52commits 1branches 0releases
11.6 MBsize
maindefault branch
19 days agolast push
Python 69.3% TypeScript 16.7% CSS 7.9% JavaScript 4.7% HTML 1.4%

KA Tabbar : sync canonique ka-ui (prop onClick sur les onglets-liens)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Simon-Pierre Boucher committed 29 days ago (Aug 25, 2026) parent ccee96a

1 changed file +9 −1

modified frontend/src/ka/KaTabbar.tsx +9 −1
@@ -144,6 +144,8 @@ export type KaTab = {
144 144 href?: string;
145 145 /** action locale (ex. ouvrir la recherche) — rend un <button> */
146 146 onPress?: () => void;
147 + /** complément d'un lien `to` (ex. focus d'un champ une fois arrivé) */
148 + onClick?: () => void;
147 149 active?: boolean;
148 150 };
149 151
@@ -176,7 +178,13 @@ export default function KaTabbar({
176 178 const c = t.active ? "active" : "";
177 179 if (t.to)
178 180 return (
179 <Link key={t.label} to={t.to} className={c} aria-current={t.active ? "page" : undefined}>
181 + <Link
182 + key={t.label}
183 + to={t.to}
184 + className={c}
185 + onClick={t.onClick}
186 + aria-current={t.active ? "page" : undefined}
187 + >
180 188 {inner}
181 189 </Link>
182 190 );
183 191