index.js 1.15 KB
Newer Older
zhanghaozhe committed
1 2
import React, { Component } from 'react';
import './index.scss'
zhanghaozhe committed
3
import { Switch, Route } from 'react-router-dom'
zhanghaozhe committed
4 5
import Scores from './scores'
import Exam from './exam'
zhanghaozhe committed
6
import SubmitAnswer from "@components/ai-test/submit-answer"
zhanghaozhe committed
7
import Analysis from "@components/ai-test/analysis"
zhanghaozhe committed
8
import Assist from "@components/ai-test/assist"
zhanghaozhe committed
9 10
import Help from '@components/ai-test/share'
import Report from '@components/ai-test/report'
zhanghaozhe committed
11 12

class AiTest extends Component {
zhanghaozhe committed
13

zhanghaozhe committed
14 15 16 17
  render() {
    const {match} = this.props
    return (
      <Switch>
zhanghaozhe committed
18 19 20 21 22 23 24
        <Route path={`${match.path}/exam`} render={props => <Exam {...props}/>}/>
        <Route path={`${match.path}/submit`} render={props => <SubmitAnswer {...props}/>}/>
        <Route path={`${match.path}/analysis/:recordId`} render={props => <Analysis {...props}/>}/>
        <Route path={`${match.path}/assist/:assistCode`} render={props => <Assist {...props}/>}/>
        <Route path={`${match.path}/share`} render={props => <Help {...props}/>}/>
        <Route path={`${match.path}/report`} render={props => <Report {...props}/>}/>
        <Route render={(props) => <Scores {...props}/>}/>
zhanghaozhe committed
25 26 27 28 29 30
      </Switch>
    );
  }
}

export default AiTest;