Ensure page reload is only done for the settings page

MAILPOET-6028
This commit is contained in:
Oluwaseun Olorunsola
2024-06-06 15:30:26 +01:00
committed by Aschepikov
parent 62c9679804
commit f7d28c8999

View File

@@ -19,7 +19,8 @@ type KeyActivationButtonPropType = {
};
const reloadPageAfterKeyActivation = () => {
setTimeout(() => window.location.reload(), 1000); // using setTimeout to add a little delay
if (!window.location.href.includes('/premium')) return; // only reload on settings page
setTimeout(() => window.location.reload(), 100); // using setTimeout to add a little delay
};
export function KeyActivationButton({