this repo has no description
0
fork

Configure Feed

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

Handle very-popular cases

- Shorten number
- Limit avatars to 50 since we have the Accounts sheet now

+9 -5
+9 -5
src/components/notification.jsx
··· 1 + import shortenNumber from '../utils/shorten-number'; 1 2 import states from '../utils/states'; 2 3 import store from '../utils/store'; 3 4 ··· 169 170 {_accounts?.length > 1 ? ( 170 171 <> 171 172 <b tabIndex="0" onClick={handleOpenGenericAccounts}> 172 - {_accounts.length} people 173 + <span title={_accounts.length}> 174 + {shortenNumber(_accounts.length)} 175 + </span>{' '} 176 + people 173 177 </b>{' '} 174 178 </> 175 179 ) : ( ··· 203 207 )} 204 208 {_accounts?.length > 1 && ( 205 209 <p class="avatars-stack"> 206 - {_accounts.map((account, i) => ( 210 + {_accounts.slice(0, 50).map((account, i) => ( 207 211 <> 208 212 <a 209 213 href={account.url} ··· 219 223 size={ 220 224 _accounts.length <= 10 221 225 ? 'xxl' 222 - : _accounts.length < 100 226 + : _accounts.length < 20 223 227 ? 'xl' 224 - : _accounts.length < 1000 228 + : _accounts.length < 30 225 229 ? 'l' 226 - : _accounts.length < 2000 230 + : _accounts.length < 40 227 231 ? 'm' 228 232 : 's' // My god, this person is popular! 229 233 }