mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-24 02:58:09 +01:00
98 lines
3.9 KiB
JavaScript
98 lines
3.9 KiB
JavaScript
|
import React, { 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 (
|
|||
|
<>
|
|||
|
{value}
|
|||
|
<br />
|
|||
|
</>
|
|||
|
);
|
|||
|
});
|
|||
|
}
|
|||
|
|
|||
|
const METAMASK_LOGO = lineBreaksToBr(`MMm*mmMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMmm*mMM
|
|||
|
MM*./***mMMMMMMMMMMMMMMMMMMMMMMMMMMm***/.*MM
|
|||
|
MM/...///*mMMMMMMMMMMMMMMMMMMMMMMm*///.../MM
|
|||
|
Mm.....//../*mMMMMMMMMMMMMMMMMm*/..//.....mM
|
|||
|
M*....../*....*mMMMMMMMMMMMMm*....*/......*M
|
|||
|
M/........*.....*//////////*...../......../M
|
|||
|
m..........*/...//........//.../*..........m
|
|||
|
M/..........//.../......../...//........../M
|
|||
|
M/.........../*/./.......//./*/.........../M
|
|||
|
M*.............////......////.............*M
|
|||
|
Mm...............**......**...............mM
|
|||
|
Mm/...............*/..../*.............../mM
|
|||
|
MM/............../*/..../*/............../MM
|
|||
|
Mm..............//./...././/..............mM
|
|||
|
MM*............*/../..../../*............*MM
|
|||
|
MM/........../*..../..../....*/........../MM
|
|||
|
MMm.........//...../..../.....//.........mMM
|
|||
|
MMm......//**....../..../......**//......mMM
|
|||
|
MMM/..////.*......./..../......././///../MMM
|
|||
|
MMMm*//..../......./..../......./....//*mMMM
|
|||
|
MMMm......*////////*....*////////*......mMMM
|
|||
|
MMM*......*////////*....*////////*......*MMM
|
|||
|
MMM/....../*......./..../.......*/....../MMM
|
|||
|
MMm........**/./m*./..../.**/..**........mMM
|
|||
|
MM*........//*mMMM///..///mMMm*//........*MM
|
|||
|
MM/........././*mM*//..//*Mm*/./........./MM
|
|||
|
Mm..........//.../**/../**/...//..........mM
|
|||
|
M*...........*..../*/../*/..../...........*M
|
|||
|
M*///////////*/.../m/../m/.../*///////////*M
|
|||
|
M*.........../*/...m/../m.../*/...........*M
|
|||
|
Mm.........../..//.*....*./*../...........mM
|
|||
|
MM/........../...//******//.../........../MM
|
|||
|
MM*........../....*MMMMMM*..../..........*MM
|
|||
|
MMm........../....*MMMMMM*..../..........mMM
|
|||
|
MMm/........//....*MMMMMM*....//......../mMM
|
|||
|
MMM/....../*mm*...*mmmmmm*...*mm*/....../MMM
|
|||
|
MMM*../*mmMMMMMm///......//*mMMMMMmm*/..*MMM
|
|||
|
MMMm*mMMMMMMMMMMm**......**mMMMMMMMMMMm*mMMM
|
|||
|
MMMMMMMMMMMMMMMMMm/....../mMMMMMMMMMMMMMMMMM
|
|||
|
MMMMMMMMMMMMMMMMMMmmmmmmmmMMMMMMMMMMMMMMMMMM`);
|
|||
|
|
|||
|
/* eslint-disable no-irregular-whitespace */
|
|||
|
const EXPERIMENTAL_AREA = lineBreaksToBr(`█▄█ █▀█ █░█ ▀ █▀█ █▀▀ █▀▀ █▄░█ ▀█▀ █▀▀ █▀█ █ █▄░█ █▀▀ ▄▀█ █▄░█
|
|||
|
░█░ █▄█ █▄█ ░ █▀▄ ██▄ ██▄ █░▀█ ░█░ ██▄ █▀▄ █ █░▀█ █▄█ █▀█ █░▀█
|
|||
|
|
|||
|
█▀▀ ▀▄▀ █▀█ █▀▀ █▀█ █ █▀▄▀█ █▀▀ █▄░█ ▀█▀ ▄▀█ █░░ ▄▀█ █▀█ █▀▀ ▄▀█
|
|||
|
██▄ █░█ █▀▀ ██▄ █▀▄ █ █░▀░█ ██▄ █░▀█ ░█░ █▀█ █▄▄ █▀█ █▀▄ ██▄ █▀█`);
|
|||
|
/* eslint-enable no-irregular-whitespace */
|
|||
|
|
|||
|
export default function ExperimentalArea({ redirectTo }) {
|
|||
|
const t = useContext(I18nContext);
|
|||
|
const history = useHistory();
|
|||
|
|
|||
|
const onClick = () => {
|
|||
|
history.push(redirectTo);
|
|||
|
};
|
|||
|
|
|||
|
return (
|
|||
|
<div className="experimental-area">
|
|||
|
<div className="logo">{METAMASK_LOGO}</div>
|
|||
|
<div className="experimental-text">{EXPERIMENTAL_AREA}</div>
|
|||
|
<div className="text">
|
|||
|
{t('flaskExperimentalText1')}
|
|||
|
<ul>
|
|||
|
<li>{t('flaskExperimentalText2')}</li>
|
|||
|
<li>{t('flaskExperimentalText3')}</li>
|
|||
|
<li>{t('flaskExperimentalText4')}</li>
|
|||
|
</ul>
|
|||
|
{t('flaskExperimentalText5')}
|
|||
|
</div>
|
|||
|
<Button type="primary" onClick={onClick}>
|
|||
|
{t('userAccepts')}
|
|||
|
</Button>
|
|||
|
</div>
|
|||
|
);
|
|||
|
}
|
|||
|
|
|||
|
ExperimentalArea.propTypes = {
|
|||
|
redirectTo: PropTypes.string,
|
|||
|
};
|