import React, { Component } from 'react';
import { connect } from 'dva';
import './less/set.less';

import SetBasic from './SetBasic';
import SetSuccess from './SetSuccess';

export default class Pay extends Component {
  constructor(props,context){
    super(props,context);
    this.state = {
      currentView: 'SetBasic',
    };
  }


  render() {

    let CurrentContent = SetBasic;
    let variableComponent = this.state.currentPage;

    if (variableComponent === 'SetSuccess') {
      CurrentContent = SetSuccess;
    }

    if (variableComponent === 'SetBasic') {
      CurrentContent = SetBasic;
    }

    return (
      <CurrentContent setRoute={(parameter) => {
        this.setState({
            currentPage: parameter
          }
        );
      }} />
    );
  }
}



