ProfileHoverCard: convert to tsx

This commit is contained in:
Alex Gleason 2022-05-01 13:11:20 -05:00
parent 829a61c3a5
commit 2e5cc2619d
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
3 changed files with 2 additions and 3 deletions

View file

@ -20,7 +20,7 @@ interface IHoverRefWrapper {
/** Makes a profile hover card appear when the wrapped element is hovered. */
export const HoverRefWrapper: React.FC<IHoverRefWrapper> = ({ accountId, children, inline = false }) => {
const dispatch = useDispatch();
const ref = useRef<HTMLElement>();
const ref = useRef<HTMLDivElement>(null);
const Elem: keyof JSX.IntrinsicElements = inline ? 'span' : 'div';
const handleMouseEnter = () => {
@ -41,7 +41,6 @@ export const HoverRefWrapper: React.FC<IHoverRefWrapper> = ({ accountId, childre
return (
<Elem
// @ts-ignore: not sure how to fix :\
ref={ref}
className='hover-ref-wrapper'
onMouseEnter={handleMouseEnter}

View file

@ -61,7 +61,7 @@ export const AccountRecord = ImmutableRecord({
note_emojified: '',
note_plain: '',
patron: null as PatronAccount | null,
relationship: ImmutableList<ImmutableMap<string, any>>(),
relationship: ImmutableMap<string, any>(),
should_refetch: false,
staff: false,
});