mirror of
https://github.com/status-im/MyCrypto.git
synced 2025-01-26 19:09:11 +00:00
b7ba8ac22d
* Nest Routes * Update routing for subtabs * Revert 'remove subtabs component' * Update contract routes * Update subtabs component * Remove typo * Update routing to handle disabled subroutes * add disable prop to request payment tab * Update request payment disabled condition * Add CaptureRouteNotFound & RouteNotFound components * Update ENS routing * Remove any type * Display 404 before unlocking wallet
39 lines
1.3 KiB
TypeScript
39 lines
1.3 KiB
TypeScript
import React, { Component } from 'react';
|
|
import Keystore from './components/Keystore';
|
|
import Mnemonic from './components/Mnemonic';
|
|
import WalletTypes from './components/WalletTypes';
|
|
import CryptoWarning from './components/CryptoWarning';
|
|
import TabSection from 'containers/TabSection';
|
|
import { RouteComponentProps } from 'react-router-dom';
|
|
import { Route, Switch } from 'react-router';
|
|
import { RouteNotFound } from 'components/RouteNotFound';
|
|
|
|
export enum WalletType {
|
|
Keystore = 'keystore',
|
|
Mnemonic = 'mnemonic'
|
|
}
|
|
|
|
export default class GenerateWallet extends Component<RouteComponentProps<{}>> {
|
|
public render() {
|
|
const currentPath = this.props.match.url;
|
|
return (
|
|
<React.Fragment>
|
|
<TabSection>
|
|
<section className="Tab-content">
|
|
{window.crypto ? (
|
|
<Switch>
|
|
<Route exact={true} path={currentPath} component={WalletTypes} />
|
|
<Route exact={true} path={`${currentPath}/keystore`} component={Keystore} />
|
|
<Route exact={true} path={`${currentPath}/mnemonic`} component={Mnemonic} />
|
|
<RouteNotFound />
|
|
</Switch>
|
|
) : (
|
|
<CryptoWarning />
|
|
)}
|
|
</section>
|
|
</TabSection>
|
|
</React.Fragment>
|
|
);
|
|
}
|
|
}
|