moved cleanup out of mount

This commit is contained in:
Xanazf 2024-10-18 00:05:06 +03:00
parent 33d3ce46c4
commit eeb2b46f76
Signed by: Xanazf
GPG key ID: 4E4A5AD1FB748427
2 changed files with 6 additions and 8 deletions

View file

@ -47,10 +47,9 @@ const NavComponent: Component<NavProps> = props => {
}
};
onMount(() => {
onCleanup(() => {
window.removeEventListener("click", handleClickOutside);
});
onMount(() => {});
onCleanup(() => {
window.removeEventListener("click", handleClickOutside);
});
createEffect(() => {

View file

@ -40,10 +40,9 @@ const TableOfContents: Component<TOCProps> = props => {
}
};
onMount(() => {
onCleanup(() => {
window.removeEventListener("click", handleClickOutside);
});
onMount(() => {});
onCleanup(() => {
window.removeEventListener("click", handleClickOutside);
});
createEffect(() => {