File tree Expand file tree Collapse file tree 2 files changed +25
-1
lines changed
site/src/pages/DeploySettingsPage/MetricsPage Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change
1
+ import { ComponentMeta , Story } from "@storybook/react"
2
+ import { makeMockApiError , MockDeploymentDAUResponse } from "testHelpers/entities"
3
+ import { MetricsPageView , MetricsPageViewProps } from "./MetricsPageView"
4
+
5
+ export default {
6
+ title : "pages/MetricsPageView" ,
7
+ component : MetricsPageView ,
8
+ } as ComponentMeta < typeof MetricsPageView >
9
+
10
+ const Template : Story < MetricsPageViewProps > = ( args ) => (
11
+ < MetricsPageView { ...args } />
12
+ )
13
+
14
+ export const MetricsPage = Template . bind ( { } )
15
+ MetricsPage . args = {
16
+ deploymentDAUs : MockDeploymentDAUResponse ,
17
+ getDeploymentDAUsError : undefined
18
+ }
19
+
20
+ export const MetricsPageError = Template . bind ( { } )
21
+ MetricsPageError . args = {
22
+ deploymentDAUs : undefined ,
23
+ getDeploymentDAUsError : makeMockApiError ( { } )
24
+ }
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import { AlertBanner } from "components/AlertBanner/AlertBanner"
3
3
import { DAUChart } from "components/DAUChart/DAUChart"
4
4
import { Stack } from "components/Stack/Stack"
5
5
6
- interface MetricsPageViewProps {
6
+ export interface MetricsPageViewProps {
7
7
deploymentDAUs ?: DeploymentDAUsResponse
8
8
getDeploymentDAUsError ?: unknown
9
9
}
You can’t perform that action at this time.
0 commit comments