import React from 'react' ; import { observer } from 'mobx-react' ; import { ButtonContext , } from 'src/components' ; import * as Links from 'src/constants/links' ; import { ViewState } from '../base' ; import { NoProfileViewModel } from 'src/viewModels/NoProfileViewModel' ; import Localization from 'src/services/localization' ; @ observer export class MissingAccountView extends ViewState { private readonly model = new NoProfileViewModel ( ) ; start ( ) { if ( this . model . hasDisabledAccount ) { this . showModal ( { title : Localization . Current . MobileProject . disabledClientAccount , primaryButton : { text : Localization . Current . Logout , action : this . model . logout , } , secondaryButton : { customRender : ( ) => ButtonContext ( { text : Localization . Current . ThinkItsAMistake , buttonText : Localization . Current . ContactUs , onPress : ( ) => Links . tryOpenLink ( Localization . Current . MobileProject . contactUsLink , false ) , } ) , } , } ) ; } else { this . showModal ( { title : Localization . Current . MobileProject . missingAccountTitle , message : Localization . Current . MobileProject . missingAccountDescription , primaryButton : { text : Localization . Current . TryAgain , action : this . model . logout , } , secondaryButton : { customRender : ( ) => ButtonContext ( { text : Localization . Current . ThinkItsAMistake , buttonText : Localization . Current . ContactUs , onPress : ( ) => Links . tryOpenLink ( Localization . Current . MobileProject . contactUsLink , false ) , } ) , } , } ) ; } } renderContent ( ) { return null ; } }