Skip to content

Commit

Permalink
frontend: add support for propagating service state to project select…
Browse files Browse the repository at this point in the history
…or (#1593)
  • Loading branch information
dschaller authored Jul 12, 2021
1 parent f96de51 commit f6043ae
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion frontend/workflows/projectSelector/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import type { BaseWorkflowProps, WorkflowConfiguration } from "@clutch-sh/core";

import { useReducerState } from "./helpers";
import ProjectSelector from "./project-selector";
import { Group } from "./types";

export interface WorkflowProps extends BaseWorkflowProps {}

Expand All @@ -26,4 +28,4 @@ const register = (): WorkflowConfiguration => {

export default register;

export { ProjectSelector };
export { Group, ProjectSelector, useReducerState };
3 changes: 2 additions & 1 deletion frontend/workflows/projectSelector/src/project-selector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const StyledProgressContainer = styled.div({
},
});

const ProjectSelector = () => {
const ProjectSelector = ({ children }) => {
// On load, we'll request a list of owned projects and their upstreams and downstreams from the API.
// The API will contain information about the relationships between projects and upstreams and downstreams.
// By default, the owned projects will be checked and others will be unchecked.
Expand Down Expand Up @@ -156,6 +156,7 @@ const ProjectSelector = () => {
<Divider />
<ProjectGroup title="Downstreams" group={Group.DOWNSTREAM} />
</StyledSelectorContainer>
{children}
</StateContext.Provider>
</DispatchContext.Provider>
);
Expand Down
1 change: 1 addition & 0 deletions frontend/workflows/projectSelector/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"composite": true,
"outDir": "./dist",
"rootDir": "./src"
},
Expand Down

0 comments on commit f6043ae

Please sign in to comment.