mirror of
https://github.com/status-im/MyCrypto.git
synced 2025-01-11 19:44:21 +00:00
816ce3180f
* Update account view routing * Temporarily add unicode character to translated strings for testing * Temporarily select add unicode to all untranslated strings * Format changes * Add all english translations for /account & /generate * Add the rest of the english translations * Add a few more missing translations * Update en translations * Get selectedLanguage from localstorage instead of redux sttate * Update snapshots * Add missing translation keys & Update translate functs & change variable prefix * translate all markdown strings & remove old translation strings * Update snapshot * Add a few more translation strs * Move raw strings being translated into json * All translation keys are now Uppercase * Fix up the last few translations * Update snapshot * Uppercase de translation strings * Bring back shapeshift logo on swap * Fix contracts tab translations * Fix a few more translations * Fix translations * remove debugging stuff * Update snapshots * Use react.fragment as markdown root renderer * Seperate markdown translations into their own function * Clean up translation functions * Clean up translation functions * Update snapshot * Fix some broken translation strings * Add prettier ignore file
55 lines
1.6 KiB
TypeScript
55 lines
1.6 KiB
TypeScript
import React, { Component } from 'react';
|
|
import translate from 'translations';
|
|
import SignMessage from './components/SignMessage';
|
|
import VerifyMessage from './components/VerifyMessage';
|
|
import TabSection from 'containers/TabSection';
|
|
import { RouteComponentProps, Switch, Route, Redirect } from 'react-router';
|
|
import SubTabs from 'components/SubTabs';
|
|
import { RouteNotFound } from 'components/RouteNotFound';
|
|
|
|
interface State {
|
|
activeTab: 'sign' | 'verify';
|
|
}
|
|
|
|
export default class SignAndVerifyMessage extends Component<RouteComponentProps<{}>, State> {
|
|
public state: State = {
|
|
activeTab: 'sign'
|
|
};
|
|
|
|
public changeTab = (activeTab: State['activeTab']) => () => this.setState({ activeTab });
|
|
|
|
public render() {
|
|
const { match, location, history } = this.props;
|
|
const currentPath = match.url;
|
|
|
|
const tabs = [
|
|
{
|
|
path: 'sign',
|
|
name: translate('NAV_SIGNMSG')
|
|
},
|
|
{
|
|
path: 'verify',
|
|
name: translate('MSG_VERIFY')
|
|
}
|
|
];
|
|
|
|
return (
|
|
<TabSection>
|
|
<section className="Tab-content SignAndVerifyMsg">
|
|
<SubTabs tabs={tabs} match={match} location={location} history={history} />
|
|
<Switch>
|
|
<Route
|
|
exact={true}
|
|
path={currentPath}
|
|
render={() => <Redirect from={`${currentPath}`} to={`${currentPath}/sign`} />}
|
|
/>
|
|
<Route exact={true} path={`${currentPath}/sign`} component={SignMessage} />
|
|
<Route exact={true} path={`${currentPath}/verify`} component={VerifyMessage} />
|
|
<RouteNotFound />
|
|
</Switch>
|
|
</section>
|
|
</TabSection>
|
|
);
|
|
}
|
|
}
|