From beb8b0e006834b5c60b17c22022a9cbf81179bee Mon Sep 17 00:00:00 2001 From: Jarda Snajdr Date: Tue, 30 Apr 2019 08:40:31 +0200 Subject: [PATCH] Dialog: remove unused onClosed property Used to be used a long time ago (removed in #8969) in Reader Full Post dialog to call a callback when dialog is unmounted. --- client/components/dialog/index.jsx | 16 +--------------- .../test/__snapshots__/modal.js.snap | 1 - 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/client/components/dialog/index.jsx b/client/components/dialog/index.jsx index c50f8602ea3c3..42f4d8bcfc079 100644 --- a/client/components/dialog/index.jsx +++ b/client/components/dialog/index.jsx @@ -4,7 +4,6 @@ */ import PropTypes from 'prop-types'; import React, { Component } from 'react'; -import { defer, noop } from 'lodash'; /** * Internal dependencies @@ -18,31 +17,18 @@ class Dialog extends Component { baseClassName: PropTypes.string, leaveTimeout: PropTypes.number, onClose: PropTypes.func, - onClosed: PropTypes.func, shouldCloseOnEsc: PropTypes.bool, }; static defaultProps = { isVisible: false, leaveTimeout: 200, - onClosed: noop, - }; - - checkOnClosed = ref => { - if ( null === ref ) { - defer( this.props.onClosed ); - } }; render() { return ( - + ); } diff --git a/client/components/language-picker/test/__snapshots__/modal.js.snap b/client/components/language-picker/test/__snapshots__/modal.js.snap index cde3bca71de8d..00df56a59bae5 100644 --- a/client/components/language-picker/test/__snapshots__/modal.js.snap +++ b/client/components/language-picker/test/__snapshots__/modal.js.snap @@ -20,7 +20,6 @@ exports[`LanguagePickerModal should render 1`] = ` isVisible={true} leaveTimeout={200} onClose={[Function]} - onClosed={[Function]} >