mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-30 05:00:51 +08:00
Merge pull request #3584 from woocommerce/PCP-4995-remove-firefox-onboarding-notice
Remove the Firefox onboarding notice (4995)
This commit is contained in:
commit
b8a979fc5f
1 changed files with 0 additions and 23 deletions
|
@ -8,13 +8,6 @@ import { OnboardingHooks } from '../../../../data/onboarding/hooks';
|
|||
import BusyStateWrapper from '../../../ReusableComponents/BusyStateWrapper';
|
||||
import { Notice } from '../../../ReusableComponents/Elements';
|
||||
|
||||
const useIsFirefox = () => {
|
||||
if ( typeof window === 'undefined' ) {
|
||||
return false;
|
||||
}
|
||||
return window.navigator.userAgent.toLowerCase().indexOf( 'firefox' ) > -1;
|
||||
};
|
||||
|
||||
/**
|
||||
* Button component that outputs a placeholder button when no onboardingUrl is present yet - the
|
||||
* placeholder button looks identical to the working button, but has no href, target, or
|
||||
|
@ -36,8 +29,6 @@ const ButtonOrPlaceholder = ( {
|
|||
children,
|
||||
onClick,
|
||||
} ) => {
|
||||
const isFirefox = useIsFirefox();
|
||||
|
||||
const buttonProps = {
|
||||
className,
|
||||
variant,
|
||||
|
@ -51,20 +42,6 @@ const ButtonOrPlaceholder = ( {
|
|||
buttonProps[ 'data-paypal-onboard-button' ] = 'true';
|
||||
}
|
||||
|
||||
if ( isFirefox ) {
|
||||
return (
|
||||
<>
|
||||
<Button { ...buttonProps }>{ children }</Button>
|
||||
<Notice type={ 'error' }>
|
||||
{ __(
|
||||
'This button may not work in Firefox. Please use another browser, like Chrome, to complete this step.',
|
||||
'woocommerce-paypal-payments'
|
||||
) }
|
||||
</Notice>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
return <Button { ...buttonProps }>{ children }</Button>;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue