diff --git a/frontend/src/stores/rulebooks.ts b/frontend/src/stores/rulebooks.ts index 4943e91..cfaa8ea 100644 --- a/frontend/src/stores/rulebooks.ts +++ b/frontend/src/stores/rulebooks.ts @@ -35,9 +35,7 @@ export const useRulebooksStore = defineStore("rulebooks", () => { async function fetchRules(topicId: number) { try { const rules = await api.listRules({ topic_id: topicId }); - rulesByTopic.value[topicId] = rules.map((r) => ({ - id: r.id, title: r.title, statement: r.statement, topic_id: r.topic_id, - })); + rulesByTopic.value[topicId] = rules.map(toHeader); } catch (e) { useToastStore().show("Failed to load rules", "error"); throw e;