Skip to content

Commit c9c0b1e

Browse files
committed
fix: show API mocks as default
1 parent 202a15e commit c9c0b1e

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

app/pages/about.stories.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,24 @@ const meta = {
77
component: About,
88
parameters: {
99
layout: 'fullscreen',
10+
msw: {
11+
handlers: [contributorsHandler],
12+
},
1013
},
1114
decorators: [pageDecorator],
1215
} satisfies Meta<typeof About>
1316

1417
export default meta
1518
type Story = StoryObj<typeof meta>
1619

17-
/** Contributors section is hidden when there is no API response but the rest of the page renders. */
20+
/** `/api/contributors` is intercepted by MSW so both governance members and community contributors sections are populated. */
1821
export const Default: Story = {}
1922

20-
/**
21-
* WithContributors — the `/api/contributors` endpoint is intercepted by MSW
22-
* so the governance members and community contributors sections are populated.
23-
*/
24-
export const WithContributors: Story = {
23+
/** Contributors section is hidden with no API response. */
24+
export const WithoutContributors: Story = {
2525
parameters: {
2626
msw: {
27-
handlers: [contributorsHandler],
27+
handlers: [],
2828
},
2929
},
3030
}

app/pages/recharging.stories.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,24 @@ const meta = {
77
component: Recharging,
88
parameters: {
99
layout: 'fullscreen',
10+
msw: {
11+
handlers: [repoStatsHandler],
12+
},
1013
},
1114
decorators: [pageDecorator],
1215
} satisfies Meta<typeof Recharging>
1316

1417
export default meta
1518
type Story = StoryObj<typeof meta>
1619

17-
/** The stats grid is hidden when there is no API response but the rest of the page renders. */
20+
/** `/api/repo-stats` is intercepted by MSW so the three-column stats grid (contributors, commits, pull requests) is visible. */
1821
export const Default: Story = {}
1922

20-
/**
21-
* WithStats — the `/api/repo-stats` endpoint is intercepted by MSW so the
22-
* three-column stats grid (contributors, commits, pull requests) becomes visible.
23-
*/
24-
export const WithStats: Story = {
23+
/** Stats grid is hidden with no API response; the rest of the page renders normally. */
24+
export const WithoutStats: Story = {
2525
parameters: {
2626
msw: {
27-
handlers: [repoStatsHandler],
27+
handlers: [],
2828
},
2929
},
3030
}

0 commit comments

Comments
 (0)