diff --git a/app/soapbox/components/account.tsx b/app/soapbox/components/account.tsx index c60893e5a..36f8c1b26 100644 --- a/app/soapbox/components/account.tsx +++ b/app/soapbox/components/account.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { Link } from 'react-router-dom'; +import { Link, useHistory } from 'react-router-dom'; import HoverRefWrapper from 'soapbox/components/hover_ref_wrapper'; import VerificationBadge from 'soapbox/components/verification_badge'; @@ -13,6 +13,25 @@ import { Avatar, HStack, IconButton, Text } from './ui'; import type { Account as AccountEntity } from 'soapbox/types/entities'; +interface IInstanceFavicon { + account: AccountEntity, +} + +const InstanceFavicon: React.FC = ({ account }) => { + const history = useHistory(); + + const handleClick: React.MouseEventHandler = (e) => { + e.stopPropagation(); + history.push(`/timeline/${account.domain}`); + }; + + return ( + + ); +}; + interface IProfilePopper { condition: boolean, wrapper: (children: any) => React.ReactElement @@ -172,9 +191,7 @@ const Account = ({ @{username} {account.favicon && ( - e.stopPropagation()}> - - + )} {(timestamp) ? (