Skip to content

Commit

Permalink
fix subproject warning (#2033)
Browse files Browse the repository at this point in the history
  • Loading branch information
pmolnar-dev authored Oct 22, 2024
1 parent 2e1b1a6 commit abc8703
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions frontend/src/pages/SubProjects/SubProjectDialogContent.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from "react";
import React, { useEffect } from "react";

import { Alert } from "@mui/material";
import Divider from "@mui/material/Divider";
Expand Down Expand Up @@ -38,12 +38,14 @@ const getDropdownMenuItems = (types) => {

const SubProjectDialogContent = (props) => {
const currencies = getCurrencies();

const { editDialogShown, storeFixedWorkflowitemType } = props;
// creation of restricted workflow item types is deprecated
// all new subprojects will have general workflow item types
if (!props.editDialogShown) {
props.storeFixedWorkflowitemType("general");
}
useEffect(() => {
if (!editDialogShown) {
storeFixedWorkflowitemType("general");
}
}, [editDialogShown, storeFixedWorkflowitemType]);

return (
<div data-test="subproject-dialog-content">
Expand Down

0 comments on commit abc8703

Please sign in to comment.