Skip to content

chore(site): migrate a few services to react-query used in the DashboardProvider #9667

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 21 commits into from
Sep 14, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix MockAppereance
  • Loading branch information
BrunoQuaresma committed Sep 14, 2023
commit e7611c6c8686cd4607c0be57582ed7569de272e5
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ import type { Meta, StoryObj } from "@storybook/react";

const MockedAppearance = {
config: MockAppearance,
preview: false,
setPreview: () => null,
save: () => null,
isPreview: false,
setPreview: () => {},
};

const meta: Meta<typeof WorkspaceStatusBadge> = {
Expand Down
7 changes: 3 additions & 4 deletions site/src/pages/WorkspacePage/Workspace.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ import { DashboardProviderContext } from "components/Dashboard/DashboardProvider
import { WorkspaceBuildLogsSection } from "pages/WorkspacePage/WorkspaceBuildLogsSection";

const MockedAppearance = {
config: Mocks.MockAppearance,
preview: false,
setPreview: () => null,
save: () => null,
config: Mocks.MockAppearanceConfig,
isPreview: false,
setPreview: () => {},
};

const meta: Meta<typeof Workspace> = {
Expand Down
9 changes: 4 additions & 5 deletions site/src/pages/WorkspacePage/WorkspaceStats.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Meta, StoryObj } from "@storybook/react";
import {
MockWorkspace,
MockAppearance,
MockAppearanceConfig,
MockBuildInfo,
MockEntitlementsWithScheduling,
MockExperiments,
Expand All @@ -10,10 +10,9 @@ import { WorkspaceStats } from "./WorkspaceStats";
import { DashboardProviderContext } from "components/Dashboard/DashboardProvider";

const MockedAppearance = {
config: MockAppearance,
preview: false,
setPreview: () => null,
save: () => null,
config: MockAppearanceConfig,
isPreview: false,
setPreview: () => {},
};

const meta: Meta<typeof WorkspaceStats> = {
Expand Down
9 changes: 4 additions & 5 deletions site/src/pages/WorkspacesPage/WorkspacesPageView.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
} from "api/typesGenerated";
import {
MockWorkspace,
MockAppearance,
MockAppearanceConfig,
MockBuildInfo,
MockEntitlementsWithScheduling,
MockExperiments,
Expand Down Expand Up @@ -71,10 +71,9 @@ const allWorkspaces = [
];

const MockedAppearance = {
config: MockAppearance,
preview: false,
setPreview: () => null,
save: () => null,
config: MockAppearanceConfig,
isPreview: false,
setPreview: () => {},
};

type FilterProps = ComponentProps<typeof WorkspacesPageView>["filterProps"];
Expand Down
2 changes: 1 addition & 1 deletion site/src/testHelpers/entities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2105,7 +2105,7 @@ export const MockDeploymentConfig: DeploymentConfig = {
options: [],
};

export const MockAppearance: TypesGen.AppearanceConfig = {
export const MockAppearanceConfig: TypesGen.AppearanceConfig = {
logo_url: "",
service_banner: {
enabled: false,
Expand Down