mirror of
https://github.com/urbit/shrub.git
synced 2024-12-23 19:05:48 +03:00
parent
6eb61f725f
commit
3a99a79867
@ -46,9 +46,12 @@ export function Mention(props: {
|
||||
const group = props.group ?? { hidden: true };
|
||||
const [showOverlay, setShowOverlay] = useState(false);
|
||||
|
||||
const toggleOverlay = () => {
|
||||
setShowOverlay((value) => !value);
|
||||
};
|
||||
const toggleOverlay = useCallback(
|
||||
() => {
|
||||
setShowOverlay(value => !value);
|
||||
},
|
||||
[showOverlay]
|
||||
);
|
||||
|
||||
return (
|
||||
<Box position='relative' display='inline-block' cursor='pointer'>
|
||||
|
@ -72,7 +72,7 @@ export const OverlaySigil = (props: OverlaySigilProps): React.FC => {
|
||||
if (scrollWindow)
|
||||
scrollWindow.removeEventListener('scroll', updateContainerOffset, true);
|
||||
};
|
||||
}, []);
|
||||
}, [scrollWindow]);
|
||||
|
||||
return (
|
||||
<Box
|
||||
@ -91,7 +91,7 @@ export const OverlaySigil = (props: OverlaySigilProps): React.FC => {
|
||||
contact={contact}
|
||||
group={group}
|
||||
history={history}
|
||||
onDismiss={() => onDismiss()}
|
||||
onDismiss={onDismiss}
|
||||
ship={ship}
|
||||
topSpace={space.top}
|
||||
{...rest}
|
||||
|
Loading…
Reference in New Issue
Block a user