Improve navigation fallback to point to current page
This fixes click on logo e.g. on the Settings page. [MAILPOET-3911]
This commit is contained in:
@@ -18,7 +18,10 @@ export function MailPoetLogoResponsive({ onClick, withLink = true }: Props) {
|
||||
navigateFallback = () => navigate('/');
|
||||
} catch (e) {
|
||||
navigateFallback = () => {
|
||||
window.location.href = `admin.php?page=${MailPoet.mainPageSlug}`;
|
||||
window.location.href = `admin.php?page=${
|
||||
new URL(window.location.href).searchParams.get('page') ??
|
||||
MailPoet.mainPageSlug
|
||||
}`;
|
||||
};
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user