mirror of
https://github.com/outline/outline.git
synced 2026-12-01 17:32:49 +03:00
fix: Rules of hooks
This commit is contained in:
1 parent
c0db3ea02a
commit
2e12e28b8c
1 file changed
+8
-5
@@ -54,11 +54,14 @@ function SidebarLink({
|
||||
}
|
||||
}, [rest.expanded]);
|
||||
|
||||
const handleClick = React.useCallback((ev: SyntheticEvent<>) => {
|
||||
ev.preventDefault();
|
||||
ev.stopPropagation();
|
||||
setExpanded(!expanded);
|
||||
}, []);
|
||||
const handleClick = React.useCallback(
|
||||
(ev: SyntheticEvent<>) => {
|
||||
ev.preventDefault();
|
||||
ev.stopPropagation();
|
||||
setExpanded(!expanded);
|
||||
},
|
||||
[expanded]
|
||||
);
|
||||
|
||||
const handleExpand = React.useCallback(() => {
|
||||
setExpanded(true);
|
||||
|
||||
Reference in new issue
Block a user