import React, { Component } from 'react';
import { View, Text } from 'react-native';
import { Button } from 'antd-mobile';
import { NavigationActions } from 'react-navigation';

class ErrorScreen extends Component {
  static navigationOptions = ({ navigation }) => ({
    title: navigation.state.params.title,
  });

  render() {
    const { navigate, state } = this.props.navigation;
    const { content } = state.params;
    return (
      <View>
        <Text>
          { content || '' }
        </Text>
        <Button onClick={() => { navigate.dispatch(NavigationActions.back()); }} >确定</Button>
      </View>
    );
  }
}

export default ErrorScreen;

