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) ? ( diff --git a/app/soapbox/features/chats/components/chat_box.js b/app/soapbox/features/chats/components/chat_box.js index f9c169d45..fac4ae894 100644 --- a/app/soapbox/features/chats/components/chat_box.js +++ b/app/soapbox/features/chats/components/chat_box.js @@ -40,7 +40,7 @@ class ChatBox extends ImmutablePureComponent { intl: PropTypes.object.isRequired, chatId: PropTypes.string.isRequired, chatMessageIds: ImmutablePropTypes.orderedSet, - chat: ImmutablePropTypes.map, + chat: ImmutablePropTypes.record, onSetInputRef: PropTypes.func, me: PropTypes.node, } diff --git a/app/soapbox/features/chats/components/chat_window.js b/app/soapbox/features/chats/components/chat_window.js index 444658675..4d811fe15 100644 --- a/app/soapbox/features/chats/components/chat_window.js +++ b/app/soapbox/features/chats/components/chat_window.js @@ -46,7 +46,7 @@ class ChatWindow extends ImmutablePureComponent { chatId: PropTypes.string.isRequired, windowState: PropTypes.string.isRequired, idx: PropTypes.number, - chat: ImmutablePropTypes.map, + chat: ImmutablePropTypes.record, me: PropTypes.node, displayFqn: PropTypes.bool, }