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 1, 2024
1 parent 69da2d2 commit 7d711bd
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 @@ -114,6 +114,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 @@ -138,4 +140,4 @@ function onSubmit(e) {
return false;
}

export default forwardRef(NewTaskDialog);
export default NewTaskDialog;

0 comments on commit 7d711bd

Please sign in to comment.