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