fix: update stale mock data in component stories
These stories were written against older component APIs and broke under the new harness: - copilot: nest message content/reasoning and use message_type; pass the required conversationInboxType - ArticlesPage: pass the required categories, allowedLocales, portalName and meta props - CategoryPage: use the real category shape (name/icon/slug/meta) so cards render titles instead of "undefined undefined" - PortalSettings: provide a portals array matching the seeded route so the settings forms render
This commit is contained in:
+26
-1
@@ -59,13 +59,38 @@ const articles = [
|
||||
views: 400,
|
||||
},
|
||||
];
|
||||
|
||||
const categories = [
|
||||
{ id: 1, name: 'Getting started', icon: '🚀' },
|
||||
{ id: 2, name: 'Marketing', icon: '⚡️' },
|
||||
{ id: 3, name: 'Development', icon: '🛠️' },
|
||||
];
|
||||
|
||||
const allowedLocales = [{ code: 'en', name: 'English' }];
|
||||
|
||||
const portalName = 'Chatwoot Help Center';
|
||||
|
||||
const meta = {
|
||||
currentPage: 1,
|
||||
allArticlesCount: articles.length,
|
||||
articlesCount: articles.length,
|
||||
mineArticlesCount: 2,
|
||||
draftArticlesCount: 1,
|
||||
archivedArticlesCount: 2,
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Story title="Pages/HelpCenter/ArticlesPage" :layout="{ type: 'single' }">
|
||||
<Variant title="All Articles">
|
||||
<div class="w-full min-h-screen bg-n-background">
|
||||
<ArticlesPage :articles="articles" />
|
||||
<ArticlesPage
|
||||
:articles="articles"
|
||||
:categories="categories"
|
||||
:allowed-locales="allowedLocales"
|
||||
:portal-name="portalName"
|
||||
:meta="meta"
|
||||
/>
|
||||
</div>
|
||||
</Variant>
|
||||
</Story>
|
||||
|
||||
Reference in New Issue
Block a user