Render incoming Reactions

This commit is contained in:
Ken Powers 2020-01-17 17:23:19 -05:00 committed by Scott Nonnenberg
parent b113eb19f0
commit 6cc0f2abce
25 changed files with 1411 additions and 134 deletions

View file

@ -1,10 +1,12 @@
import * as React from 'react';
import classNames from 'classnames';
import { LocalizerType } from '../types/Util';
import { Avatar, Props as AvatarProps } from './Avatar';
import { isEmpty } from 'lodash';
import { Avatar, Props as AvatarProps } from './Avatar';
import { useRestoreFocus } from './hooks';
import { LocalizerType } from '../types/Util';
export type Props = {
readonly i18n: LocalizerType;
@ -32,18 +34,7 @@ export const AvatarPopup = (props: Props) => {
// Note: mechanisms to dismiss this view are all in its host, MainHeader
// Focus first button after initial render, restore focus on teardown
React.useEffect(() => {
const lastFocused = document.activeElement as any;
if (focusRef.current) {
focusRef.current.focus();
}
return () => {
if (lastFocused && lastFocused.focus) {
lastFocused.focus();
}
};
}, []);
useRestoreFocus(focusRef);
return (
<div style={style} className="module-avatar-popup">