Skip to content

Commit

Permalink
fix(pages editor): broken prop types in EditStepDialog and NewTaskDialog
Browse files Browse the repository at this point in the history
  • Loading branch information
eatyourgreens committed Jun 22, 2024
1 parent ff91ea9 commit 354fd0f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const taskNames = {

const DEFAULT_HANDLER = () => {};

function EditStepDialog({
function EditStepDialogWithRef({
allTasks = {},
deleteTask,
enforceLimitedBranchingRule,
Expand Down Expand Up @@ -116,6 +116,8 @@ function EditStepDialog({
);
}

const EditStepDialog = forwardRef(EditStepDialogWithRef);

EditStepDialog.propTypes = {
allTasks: PropTypes.object,
deleteTask: PropTypes.func,
Expand All @@ -133,4 +135,4 @@ function onSubmit(e) {
return false;
}

export default forwardRef(EditStepDialog);
export default EditStepDialog;
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import TaskIcon from '../../../icons/TaskIcon.jsx';

const DEFAULT_HANDLER = () => {};

function NewTaskDialog({
function NewTaskDialogWithRef({
addTask = DEFAULT_HANDLER,
enforceLimitedBranchingRule,
openEditStepDialog = DEFAULT_HANDLER,
Expand Down Expand Up @@ -122,6 +122,8 @@ function NewTaskDialog({
);
}

const NewTaskDialog = forwardRef(NewTaskDialogWithRef);

NewTaskDialog.propTypes = {
addTask: PropTypes.func,
enforceLimitedBranchingRule: PropTypes.shape({
Expand All @@ -136,4 +138,4 @@ function onSubmit(e) {
return false;
}

export default forwardRef(NewTaskDialog);
export default NewTaskDialog;

0 comments on commit 354fd0f

Please sign in to comment.