mirror of
https://github.com/chaoticbackup/chaoticbackup.github.io.git
synced 2026-04-14 04:45:53 -05:00
25 lines
625 B
JavaScript
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>
|
|
);
|
|
}
|