From 1d4d9b9fc103fad6cb981a6ec2fc14f48a20e9a6 Mon Sep 17 00:00:00 2001 From: spsiddarthan Date: Mon, 4 Mar 2024 15:38:23 +0530 Subject: [PATCH] Get rid of unused function. --- .../src/components/connection-verify/index.js | 44 +------------------ 1 file changed, 2 insertions(+), 42 deletions(-) diff --git a/projects/js-packages/publicize-components/src/components/connection-verify/index.js b/projects/js-packages/publicize-components/src/components/connection-verify/index.js index 15051c5177184..17343f0628ce3 100644 --- a/projects/js-packages/publicize-components/src/components/connection-verify/index.js +++ b/projects/js-packages/publicize-components/src/components/connection-verify/index.js @@ -8,10 +8,9 @@ * not render anything. */ -import { Notice } from '@wordpress/components'; import { compose } from '@wordpress/compose'; import { withDispatch, withSelect } from '@wordpress/data'; -import { Component, Fragment } from '@wordpress/element'; +import { Component } from '@wordpress/element'; import { SOCIAL_STORE_ID } from '../../social-store'; class PublicizeConnectionVerify extends Component { @@ -19,47 +18,8 @@ class PublicizeConnectionVerify extends Component { this.props.refreshConnections(); } - /** - * Opens up popup so user can refresh connection - * - * Displays pop up with to specified URL where user - * can refresh a specific connection. - * - * @param {object} event - Event instance for onClick. - */ - refreshConnectionClick = event => { - const { href, title } = event.target; - event.preventDefault(); - // open a popup window - // when it is closed, kick off the tests again - const popupWin = window.open( href, title, '' ); - const popupTimer = window.setInterval( () => { - if ( false !== popupWin.closed ) { - window.clearInterval( popupTimer ); - this.props.refreshConnections(); - } - }, 500 ); - }; - - renderNonRefreshableConnections() { - const { failedConnections } = this.props; - const nonRefreshableConnections = failedConnections.filter( - connection => ! connection.can_refresh - ); - - if ( nonRefreshableConnections.length ) { - return nonRefreshableConnections.map( connection => ( - -

{ connection.test_message }

-
- ) ); - } - - return null; - } - render() { - return { this.renderNonRefreshableConnections() }; + return null; } }