Skip to content

Commit

Permalink
changing to import statements for consistency and clarity on what the…
Browse files Browse the repository at this point in the history
… imports are for
  • Loading branch information
selfcontained committed Nov 7, 2023
1 parent 46701c4 commit d279b8f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions components/dashboard/src/data/setup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
import { FunctionComponent } from "react";
import debounce from "lodash.debounce";
// Need to import all the protobuf classes we want to support for hydration
import * as OrganizationClasses from "@gitpod/public-api/lib/gitpod/v1/organization_pb";
import * as WorkspaceClasses from "@gitpod/public-api/lib/gitpod/v1/workspace_pb";
import * as PaginationClasses from "@gitpod/public-api/lib/gitpod/v1/pagination_pb";
import * as ConfigurationClasses from "@gitpod/public-api/lib/gitpod/v1/configuration_pb";

// This is used to version the cache
Expand Down Expand Up @@ -136,10 +139,9 @@ const supportedMessages = new Map<string, typeof Message>();

function initializeMessages() {
const constr = [
...Object.values(require("@gitpod/public-api/lib/gitpod/v1/organization_pb")),
...Object.values(require("@gitpod/public-api/lib/gitpod/v1/workspace_pb")),
...Object.values(require("@gitpod/public-api/lib/gitpod/v1/pagination_pb")),
...Object.values(require("@gitpod/public-api/lib/gitpod/v1/pagination_pb")),
...Object.values(OrganizationClasses),
...Object.values(WorkspaceClasses),
...Object.values(PaginationClasses),
...Object.values(ConfigurationClasses),
];
for (const c of constr) {
Expand Down

0 comments on commit d279b8f

Please sign in to comment.