Feedback form: load categories from the BFF

The form offers the admin-managed categories, falling back to the original
four if they can't be loaded. "My feedback" shows the server's labels.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
gosangam
2026-10-18 13:47:09 +05:30
co-authored by Claude Opus 5.5
parent 0a23ab59f7
commit 52cd48b12e
3 changed files with 61 additions and 16 deletions
+3 -1
View File
@@ -152,7 +152,9 @@ export default function FeedbacksPage() {
function FeedbackCard({ feedback: f }: { feedback: Feedback }) {
const status = statusOf(f);
const meta = STATUS_META[status];
const category = CATEGORY_LABEL[f.category] ?? f.category;
// The server's label tracks renames in the admin; the map covers an older
// BFF that doesn't send one yet.
const category = f.category_label || CATEGORY_LABEL[f.category] || f.category;
return (
<li className="rounded-xl border border-border bg-card p-4 sm:p-5">