Skip to content

Commit

Permalink
web: add missing dependency for ApiButton stories and correct data fo…
Browse files Browse the repository at this point in the history
…rmat for memo use in Sidebar (#5216)
  • Loading branch information
lizzthabet committed Nov 24, 2021
1 parent 7b4286c commit 62eb5bc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions web/src/ApiButton.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import styled from "styled-components"
import { ApiButton } from "./ApiButton"
import { makeUIButton, textField } from "./ApiButton.testhelpers"
import { OverviewButtonMixin } from "./OverviewButton"
import { TiltSnackbarProvider } from "./Snackbar"

type UIButton = Proto.v1alpha1UIButton
type UIInputSpec = Proto.v1alpha1UIInputSpec
Expand All @@ -15,9 +16,11 @@ export default {
decorators: [
(Story: any) => (
<MemoryRouter initialEntries={["/"]}>
<div style={{ margin: "-1rem" }}>
<Story />
</div>
<TiltSnackbarProvider>
<div style={{ margin: "-1rem" }}>
<Story />
</div>
</TiltSnackbarProvider>
</MemoryRouter>
),
],
Expand Down
2 changes: 1 addition & 1 deletion web/src/SidebarResources.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ export function SidebarListSection(props: SidebarSectionProps): JSX.Element {
})

return [enabledItems, disabledItems]
}, props.items)
}, [props.items])

// The title for the disabled resource list is semantically important,
// but should only be visible when there's no filter term
Expand Down

0 comments on commit 62eb5bc

Please sign in to comment.