Skip to content

Commit

Permalink
Apply suggested clean up from review
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronrobertshaw committed Oct 13, 2023
1 parent 5343203 commit ecc9f4a
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ export default function RenamePatternCategoryModal( {

try {
setIsSaving( true );
setName( '' );
onClose?.();

// User pattern category properties may differ as they can be
// normalized for use alongside template part areas, core pattern
Expand All @@ -63,6 +61,7 @@ export default function RenamePatternCategoryModal( {

invalidateResolution( 'getUserPatternCategories' );
onSuccess?.( savedRecord );
onClose();

createSuccessNotice( __( 'Pattern category renamed.' ), {
type: 'snackbar',
Expand All @@ -81,7 +80,7 @@ export default function RenamePatternCategoryModal( {
};

const onRequestClose = () => {
onClose?.();
onClose();
setName( '' );
};

Expand Down

0 comments on commit ecc9f4a

Please sign in to comment.