chat: address PR comments

Fixes urbit/landscape#303
This commit is contained in:
James Acklin 2021-02-08 10:48:29 -05:00
parent 6eb61f725f
commit 3a99a79867
2 changed files with 8 additions and 5 deletions

View File

@ -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'>

View File

@ -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}