Skip to content

chore: consolidate ManageSettingsLayout code #14885

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
Oct 3, 2024
Prev Previous commit
Next Next commit
mock the context
  • Loading branch information
aslilac committed Oct 3, 2024
commit 62b457584fe532ae6a9812f5a256bb992b8068cf
13 changes: 5 additions & 8 deletions site/src/testHelpers/storybook.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { useQueryClient } from "react-query";
import {
MockAppearanceConfig,
MockDefaultOrganization,
MockDeploymentConfig,
MockEntitlements,
} from "./entities";

Expand Down Expand Up @@ -126,17 +127,13 @@ export const withGlobalSnackbar = (Story: FC) => (
</>
);

export const withManagementSettingsProvider = (
Story: FC,
{ parameters }: StoryContext,
) => {
export const withManagementSettingsProvider = (Story: FC) => {
return (
<ManagementSettingsContext.Provider
value={{
deploymentValues: {
config: parameters.deploymentValues ?? {},
options: parameters.deploymentOptions ?? [],
},
deploymentValues: MockDeploymentConfig,
organizations: [MockDefaultOrganization],
organization: MockDefaultOrganization,
}}
>
<Story />
Expand Down
Loading