fix: remove unmount logic, causes rendering issue

Removing the unmounting logic since it causes an unmount when the content is unloaded from leaving the viewport
This commit is contained in:
Jacobtread 2024-03-25 20:38:22 +13:00
parent 9eca52aedb
commit efab24eae0

View file

@ -116,19 +116,4 @@ function renderTimekeep(
)
);
}
const observer = new MutationObserver((_, observer) => {
if (!reactWrapper.isConnected) {
// Unmount the react component
root.unmount();
// Disconnect the observer
observer.disconnect();
}
});
// Observe the document for changes
observer.observe(document.body, {
childList: true,
subtree: true,
});
}