💄 Remove the gap at the top of the screen

This commit is contained in:
Philipp Stracker 2025-01-14 12:36:34 +01:00
parent ed66f2bc05
commit ffc8dc8d6b
No known key found for this signature in database

View file

@ -1,4 +1,4 @@
import { useCallback } from '@wordpress/element'; import { useCallback, useLayoutEffect } from '@wordpress/element';
import { Button, Icon } from '@wordpress/components'; import { Button, Icon } from '@wordpress/components';
import { chevronLeft } from '@wordpress/icons'; import { chevronLeft } from '@wordpress/icons';
import classNames from 'classnames'; import classNames from 'classnames';
@ -34,6 +34,11 @@ const TopNavigation = ( {
} }
}, [ exitOnTitleClick, goToWooCommercePaymentsTab, onTitleClick ] ); }, [ exitOnTitleClick, goToWooCommercePaymentsTab, onTitleClick ] );
// Removes the excess padding at the top of the navigation bar.
useLayoutEffect( () => {
window.dispatchEvent( new Event( 'resize' ) );
}, [] );
return ( return (
<div className={ className }> <div className={ className }>
<div className="ppcp-r-navigation"> <div className="ppcp-r-navigation">