moved cleanup out of mount
This commit is contained in:
parent
33d3ce46c4
commit
eeb2b46f76
|
@ -47,10 +47,9 @@ const NavComponent: Component<NavProps> = props => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {});
|
||||||
onCleanup(() => {
|
onCleanup(() => {
|
||||||
window.removeEventListener("click", handleClickOutside);
|
window.removeEventListener("click", handleClickOutside);
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
createEffect(() => {
|
createEffect(() => {
|
||||||
|
|
|
@ -40,10 +40,9 @@ const TableOfContents: Component<TOCProps> = props => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {});
|
||||||
onCleanup(() => {
|
onCleanup(() => {
|
||||||
window.removeEventListener("click", handleClickOutside);
|
window.removeEventListener("click", handleClickOutside);
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
createEffect(() => {
|
createEffect(() => {
|
||||||
|
|
Loading…
Reference in a new issue