chaoticbackup.github.io/src/components/entercode/index.js
2020-10-15 16:26:39 -04:00

25 lines
625 B
JavaScript

import React from 'react';
import { observer, inject } from 'mobx-react';
import { Route } from 'react-router-dom';
import EnterTheCode from './EnterTheCode';
import PackSimulator from './PackSimulator';
@inject((stores, props, context) => props) @observer
export default class Base extends React.Component {
render() {
return (<Routing {...this.props} />);
}
}
function Routing(props) {
const { match } = props;
return (
<div className="pack">
<Route exact path={match.url} component={EnterTheCode} />
<Route path={`${match.url}/PackSimulator`} component={PackSimulator} />
</div>
);
}