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 Jul 17, 2024
1 parent ba28a5c commit 7691256
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 @@ -117,6 +117,8 @@ function EditStepDialog({
);
}

const EditStepDialog = forwardRef(EditStepDialogWithRef);

EditStepDialog.propTypes = {
allTasks: PropTypes.object,
deleteTask: PropTypes.func,
Expand All @@ -134,4 +136,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 7691256

Please sign in to comment.