: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
import React from 'react';
const genericRequestError = __(
'Something went wrong with the request.',
const checkStatus = () => {
makeRequest('smush_webp_get_status')
setCurrentStep(currentStep + 1);
.catch(() => setRulesError(genericRequestError));
const applyRules = () => {
makeRequest('smush_webp_apply_htaccess_rules')
.catch(() => setRulesError(genericRequestError));
const hideWizard = (e) => {
e.currentTarget.classList.add(
makeRequest('smush_toggle_webp_wizard').then(() => location.reload());
className="sui-button sui-button-ghost"
<span className="sui-loading-text">
<span className="sui-icon-logout" aria-hidden="true"></span>
<span className="sui-hidden-xs">
{__('Quit setup', 'wp-smushit')}
<span className="sui-hidden-sm sui-hidden-md sui-hidden-lg">
{__('Quit', 'wp-smushit')}
className="sui-icon-loader sui-loading"
className="sui-button sui-button-compound sui-button-ghost"
onClick={() => setCurrentStep(currentStep - 1)}
<span className="sui-compound-desktop" aria-hidden="true">
<span className="sui-icon-arrow-left"></span>
{__('Previous', 'wp-smushit')}
<span className="sui-compound-mobile" aria-hidden="true">
<span className="sui-icon-arrow-left"></span>
<span className="sui-screen-reader-text">
{__('Previous', 'wp-smushit')}
const getButtonsRight = () => {
className="sui-button sui-button-blue sui-button-icon-right"
onClick={() => setCurrentStep(currentStep + 1)}
{__('Next', 'wp-smushit')}
className="sui-icon-arrow-right"
if ('apache' === serverType && 'automatic' === rulesMethod) {
className="sui-button sui-button-blue"
{__('Apply rules', 'wp-smushit')}
className="sui-button sui-button-blue"
{__('Check status', 'wp-smushit')}
className="sui-button sui-button-blue"
<span className="sui-button-text-default">
{__('Finish', 'wp-smushit')}
<span className="sui-button-text-onload">
className="sui-icon-loader sui-loading"
{__('Finishing setup…', 'wp-smushit')}
<div className="sui-box-footer">
<div className="sui-actions-left">
<div className="sui-actions-right">{getButtonsRight()}</div>