this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Testing showing activity on Account Block

Meh

+30 -2
+30 -2
src/components/account-block.jsx
··· 1 1 import './account-block.css'; 2 2 3 3 import emojifyText from '../utils/emojify-text'; 4 + import niceDateTime from '../utils/nice-date-time'; 4 5 import states from '../utils/states'; 5 6 6 7 import Avatar from './avatar'; ··· 12 13 instance, 13 14 external, 14 15 onClick, 16 + showActivity = false, 15 17 }) { 16 18 if (skeleton) { 17 19 return ( ··· 26 28 ); 27 29 } 28 30 29 - const { acct, avatar, avatarStatic, displayName, username, emojis, url } = 30 - account; 31 + const { 32 + acct, 33 + avatar, 34 + avatarStatic, 35 + displayName, 36 + username, 37 + emojis, 38 + url, 39 + statusesCount, 40 + lastStatusAt, 41 + } = account; 31 42 const displayNameWithEmoji = emojifyText(displayName, emojis); 32 43 33 44 return ( ··· 58 69 <b>{username}</b> 59 70 )} 60 71 <br />@{acct} 72 + {showActivity && ( 73 + <> 74 + <br /> 75 + <small class="last-status-at insignificant"> 76 + Posts: {statusesCount} 77 + {!!lastStatusAt && ( 78 + <> 79 + {' '} 80 + &middot; Last posted:{' '} 81 + {niceDateTime(lastStatusAt, { 82 + hideTime: true, 83 + })} 84 + </> 85 + )} 86 + </small> 87 + </> 88 + )} 61 89 </span> 62 90 </a> 63 91 );