Skip to content

Commit

Permalink
Clean up error state when requesting close modal
Browse files Browse the repository at this point in the history
  • Loading branch information
renintw committed May 31, 2023
1 parent 2859d7d commit cb63d73
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions settings/src/components/revalidate-modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@ import { useMergeRefs, useFocusableIframe } from '@wordpress/compose';
import { refreshRecord } from '../utilities';

export default function RevalidateModal() {
const { clickScreenLink } = useContext( GlobalContext );
const { clickScreenLink, setError } = useContext( GlobalContext );

const goBack = ( event ) => clickScreenLink( event, 'account-status' );
const goBack = ( event ) => {
clickScreenLink( event, 'account-status' );
setError( '' );
};

return (
<Modal
Expand Down

0 comments on commit cb63d73

Please sign in to comment.