|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
import React from 'react';
|
|
|
|
|
import { useSelector } from 'react-redux';
|
|
|
|
|
import styled from 'styled-components';
|
|
|
|
|
import { MessageRenderingProps } from '../../../../models/messageType';
|
|
|
|
|
import { PubKey } from '../../../../session/types';
|
|
|
|
|
import {
|
|
|
|
@ -19,6 +20,8 @@ type Props = {
|
|
|
|
|
messageId: string;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const StyledAuthorContainer = styled(Flex)`color: var(--color-text)`;
|
|
|
|
|
|
|
|
|
|
export const MessageAuthorText = (props: Props) => {
|
|
|
|
|
const selected = useSelector(state => getMessageAuthorProps(state as any, props.messageId));
|
|
|
|
|
|
|
|
|
@ -38,7 +41,7 @@ export const MessageAuthorText = (props: Props) => {
|
|
|
|
|
const displayedPubkey = authorProfileName ? PubKey.shorten(sender) : sender;
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<Flex container={true}>
|
|
|
|
|
<StyledAuthorContainer container={true}>
|
|
|
|
|
<ContactName
|
|
|
|
|
pubkey={displayedPubkey}
|
|
|
|
|
name={authorName}
|
|
|
|
@ -47,6 +50,6 @@ export const MessageAuthorText = (props: Props) => {
|
|
|
|
|
boldProfileName={true}
|
|
|
|
|
shouldShowPubkey={Boolean(isPublic)}
|
|
|
|
|
/>
|
|
|
|
|
</Flex>
|
|
|
|
|
</StyledAuthorContainer>
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|