mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
The first page of the Flask onboarding was causing a propType warning to appear in the console. It was caused by the array of React Fragments used to construct the ASCII fox; they were missing the `key` prop. These fragments are static content, so React doesn't really need to worry about what to do in the event they are re-ordered. The array index has been used as the key to silence the warning.
This commit is contained in:
parent
ac5d06e4e3
commit
57e83ff82a
@ -1,16 +1,16 @@
|
||||
import React, { useContext } from 'react';
|
||||
import React, { Fragment, useContext } from 'react';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import PropTypes from 'prop-types';
|
||||
import { I18nContext } from '../../../../contexts/i18n';
|
||||
import Button from '../../../ui/button';
|
||||
|
||||
function lineBreaksToBr(source) {
|
||||
return source.split('\n').map((value) => {
|
||||
return source.split('\n').map((value, index) => {
|
||||
return (
|
||||
<>
|
||||
<Fragment key={index}>
|
||||
{value}
|
||||
<br />
|
||||
</>
|
||||
</Fragment>
|
||||
);
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user