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 './index.scss'; interface State { activeTab: 'sign' | 'verify'; } export default class SignAndVerifyMessage extends Component<{}, State> { public state: State = { activeTab: 'sign' }; public changeTab = (activeTab: State['activeTab']) => () => this.setState({ activeTab }); public render() { const { activeTab } = this.state; let content; let signActive = ''; let verifyActive = ''; if (activeTab === 'sign') { content = ; signActive = 'is-active'; } else { content = ; verifyActive = 'is-active'; } return ( {translate('Sign Message')} {' '} or{' '} {translate('Verify Message')} {content} ); } }