import React, { Component } from 'react'; import translate from 'translations'; import Interact from './components/Interact'; import Deploy from './components/Deploy'; import './index.scss'; import TabSection from 'containers/TabSection'; interface State { activeTab: string; } export default class Contracts extends Component<{}, State> { public state: State = { activeTab: 'interact' }; public changeTab = activeTab => () => this.setState({ activeTab }); public render() { const { activeTab } = this.state; let content; let interactActive = ''; let deployActive = ''; if (activeTab === 'interact') { content = ; interactActive = 'is-active'; } else { content = ; deployActive = 'is-active'; } return ( {translate('NAV_InteractContract')} {' '} or{' '} {translate('NAV_DeployContract')} {content} ); } }