Skip to content

Commit 6a22181

Browse files
committed
Fix 2 stories
1 parent 1f8cae4 commit 6a22181

File tree

1 file changed

+37
-18
lines changed

1 file changed

+37
-18
lines changed

site/src/components/Resources/ResourceCard.stories.tsx

Lines changed: 37 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { Story } from "@storybook/react"
33
import { MockWorkspace, MockWorkspaceResource } from "testHelpers/entities"
44
import { AgentRow } from "./AgentRow"
55
import { ResourceCard, ResourceCardProps } from "./ResourceCard"
6+
import { ProxyContext, getURLs } from "contexts/ProxyContext"
67

78
export default {
89
title: "components/ResourceCard",
@@ -15,15 +16,24 @@ export const Example = Template.bind({})
1516
Example.args = {
1617
resource: MockWorkspaceResource,
1718
agentRow: (agent) => (
18-
<AgentRow
19-
showApps
20-
key={agent.id}
21-
agent={agent}
22-
workspace={MockWorkspace}
23-
applicationsHost=""
24-
serverVersion=""
25-
onUpdateAgent={action("updateAgent")}
26-
/>
19+
<ProxyContext.Provider
20+
value={{
21+
proxy: getURLs([], undefined),
22+
isLoading: false,
23+
setProxy: () => {
24+
return
25+
},
26+
}}
27+
>
28+
<AgentRow
29+
showApps
30+
key={agent.id}
31+
agent={agent}
32+
workspace={MockWorkspace}
33+
serverVersion=""
34+
onUpdateAgent={action("updateAgent")}
35+
/>
36+
</ProxyContext.Provider>
2737
),
2838
}
2939

@@ -70,14 +80,23 @@ BunchOfMetadata.args = {
7080
],
7181
},
7282
agentRow: (agent) => (
73-
<AgentRow
74-
showApps
75-
key={agent.id}
76-
agent={agent}
77-
workspace={MockWorkspace}
78-
applicationsHost=""
79-
serverVersion=""
80-
onUpdateAgent={action("updateAgent")}
81-
/>
83+
<ProxyContext.Provider
84+
value={{
85+
proxy: getURLs([], undefined),
86+
isLoading: false,
87+
setProxy: () => {
88+
return
89+
},
90+
}}
91+
>
92+
<AgentRow
93+
showApps
94+
key={agent.id}
95+
agent={agent}
96+
workspace={MockWorkspace}
97+
serverVersion=""
98+
onUpdateAgent={action("updateAgent")}
99+
/>
100+
</ProxyContext.Provider>
82101
),
83102
}

0 commit comments

Comments
 (0)