9 Commits

Author SHA1 Message Date
db5dbd8b31 nutrition for platform 2026-09-30 13:43:17 +05:30
dd718d4e81 health score: move the non-food early return past the hook
`if (!isEdible(category)) return null` sat on the line above `useQuery`, which
made the hook conditional. React counts hooks per component instance, so one
drawer reused for two products -- a soap and then a biscuit, which is ordinary
browsing in the global catalogue -- went 0 hooks then 1 and threw "rendered more
hooks than during the previous render".

That does not degrade the panel, it unmounts the tree: the health score then
disappears for EVERY product until the page is reloaded, which reads exactly
like the feature having been switched off.

The guard now sits after the hook, and `enabled` carries the intent the early
return was protecting -- a non-food product still asks the service nothing.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-30 12:23:50 +05:30
ced0236ca7 nutrition panel removed 2026-09-30 11:52:35 +05:30
8f7c6af401 nutrition 2026-09-29 17:29:45 +05:30
5a18d56933 auto mail 2026-09-29 16:51:30 +05:30
8c878f842a error msg fix 2026-09-28 20:03:01 +05:30
adaac48e9b fix 2026-09-28 19:51:04 +05:30
69d10975b3 code fix 2026-09-28 19:34:38 +05:30
9706fcc520 initial commit 2026-09-28 17:24:00 +05:30