Move timestamp back to Account

vite
Chewbacca 2023-01-06 12:03:57 -05:00
rodzic 24f4737a91
commit d6c9952a8c
2 zmienionych plików z 4 dodań i 17 usunięć

Wyświetl plik

@ -310,13 +310,7 @@ const Status: React.FC<IStatus> = (props) => {
react: handleHotkeyReact, react: handleHotkeyReact,
}; };
const timestampEl = ( const accountAction = props.accountAction;
<Link to={statusUrl} className='hover:underline' onClick={(event) => event.stopPropagation()}>
<RelativeTimestamp timestamp={actualStatus.created_at} theme='muted' size='sm' className='whitespace-nowrap' />
</Link>
);
const accountAction = props.accountAction || timestampEl;
const isUnderReview = actualStatus.visibility === 'self'; const isUnderReview = actualStatus.visibility === 'self';
const isSensitive = actualStatus.hidden; const isSensitive = actualStatus.hidden;
@ -347,6 +341,8 @@ const Status: React.FC<IStatus> = (props) => {
<AccountContainer <AccountContainer
key={String(actualStatus.getIn(['account', 'id']))} key={String(actualStatus.getIn(['account', 'id']))}
id={String(actualStatus.getIn(['account', 'id']))} id={String(actualStatus.getIn(['account', 'id']))}
timestamp={actualStatus.created_at}
timestampUrl={statusUrl}
action={accountAction} action={accountAction}
hideActions={!accountAction} hideActions={!accountAction}
showEdit={!!actualStatus.edited_at} showEdit={!!actualStatus.edited_at}

Wyświetl plik

@ -59,15 +59,6 @@ const DetailedStatus: React.FC<IDetailedStatus> = ({
const isUnderReview = actualStatus.visibility === 'self'; const isUnderReview = actualStatus.visibility === 'self';
const isSensitive = actualStatus.hidden; const isSensitive = actualStatus.hidden;
const timestampEl = (
<RelativeTimestamp
timestamp={actualStatus.created_at}
theme='muted'
size='sm'
className='whitespace-nowrap'
/>
);
let statusTypeIcon = null; let statusTypeIcon = null;
let quote; let quote;
@ -97,7 +88,7 @@ const DetailedStatus: React.FC<IDetailedStatus> = ({
<Account <Account
key={account.id} key={account.id}
account={account} account={account}
action={timestampEl} timestamp={actualStatus.created_at}
avatarSize={42} avatarSize={42}
hideActions hideActions
/> />