1
1
mirror of https://github.com/urbit/shrub.git synced 2024-12-29 07:03:37 +03:00

chat: address PR comments

Fixes 
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
pkg/interface/src/views/components

View File

@ -46,9 +46,12 @@ export function Mention(props: {
const group = props.group ?? { hidden: true }; const group = props.group ?? { hidden: true };
const [showOverlay, setShowOverlay] = useState(false); const [showOverlay, setShowOverlay] = useState(false);
const toggleOverlay = () => { const toggleOverlay = useCallback(
setShowOverlay((value) => !value); () => {
}; setShowOverlay(value => !value);
},
[showOverlay]
);
return ( return (
<Box position='relative' display='inline-block' cursor='pointer'> <Box position='relative' display='inline-block' cursor='pointer'>

View File

@ -72,7 +72,7 @@ export const OverlaySigil = (props: OverlaySigilProps): React.FC => {
if (scrollWindow) if (scrollWindow)
scrollWindow.removeEventListener('scroll', updateContainerOffset, true); scrollWindow.removeEventListener('scroll', updateContainerOffset, true);
}; };
}, []); }, [scrollWindow]);
return ( return (
<Box <Box
@ -91,7 +91,7 @@ export const OverlaySigil = (props: OverlaySigilProps): React.FC => {
contact={contact} contact={contact}
group={group} group={group}
history={history} history={history}
onDismiss={() => onDismiss()} onDismiss={onDismiss}
ship={ship} ship={ship}
topSpace={space.top} topSpace={space.top}
{...rest} {...rest}