Skip to content

Commit

Permalink
Extract variables to top level
Browse files Browse the repository at this point in the history
  • Loading branch information
psrpinto committed Aug 16, 2024
1 parent 88fdb9c commit a457a30
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/plugin/scripts/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import { EventBus } from '../../shared/event-bus';

const progressContainer = document.getElementById( 'progress-container' );
const progressBar = document.getElementById( 'progress-bar' );
const progressText = document.getElementById( 'progress-text' );

const startImportButton = document.getElementById( 'try-wordpress-import' );
if ( startImportButton ) {
const eventBus = new EventBus( { targetWindow: window.parent } );

Check failure on line 9 in src/plugin/scripts/index.js

View workflow job for this annotation

GitHub Actions / lint

'eventBus' is assigned a value but never used
Expand All @@ -9,11 +13,7 @@ if ( startImportButton ) {
}

function startImport() {
const progressContainer = document.getElementById( 'progress-container' );
progressContainer.style.display = 'block';

const progressBar = document.getElementById( 'progress-bar' );
const progressText = document.getElementById( 'progress-text' );
progressBar.style.width = '1%';
progressText.textContent = '1%';

Expand Down

0 comments on commit a457a30

Please sign in to comment.