Fix key warnings

ci-review-rules
Justin 2022-05-24 09:46:21 -04:00
rodzic c6c816a6ec
commit 1133b05714
2 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -31,8 +31,8 @@ const FollowRecommendationsList: React.FC = () => {
return (
<div className='column-list'>
{suggestions.size > 0 ? suggestions.map((suggestion: { account: string }) => (
<Account key={suggestion.account} id={suggestion.account} />
{suggestions.size > 0 ? suggestions.map((suggestion: { account: string }, idx: number) => (
<Account key={idx} id={suggestion.account} />
)) : (
<div className='column-list__empty-message'>
<FormattedMessage id='empty_column.follow_recommendations' defaultMessage='Looks like no suggestions could be generated for you. You can try using search to look for people you might know or explore trending hashtags.' />

Wyświetl plik

@ -112,7 +112,7 @@ const ProfileDropdown: React.FC<IProfileDropdown> = ({ account, children }) => {
{menu.map((menuItem, idx) => {
if (menuItem.toggle) {
return (
<div className='flex flex-row items-center justify-between px-4 py-1 text-sm text-gray-700 dark:text-gray-400'>
<div key={idx} className='flex flex-row items-center justify-between px-4 py-1 text-sm text-gray-700 dark:text-gray-400'>
<span>{menuItem.text}</span>
{menuItem.toggle}