mirror of
https://github.com/chaoticbackup/chaoticbackup.github.io.git
synced 2026-04-25 15:58:11 -05:00
#5 portal; types; single attacks
This commit is contained in:
parent
1413c0eb53
commit
e0df5ec9ba
|
|
@ -7,10 +7,15 @@ import EnterTheCode from './account/EnterTheCode';
|
||||||
import Collection from './collection/index';
|
import Collection from './collection/index';
|
||||||
import Portal from './portal/index';
|
import Portal from './portal/index';
|
||||||
|
|
||||||
|
import ExampleHome from './example/Home';
|
||||||
|
import ExampleBase from './example/Base';
|
||||||
|
import ExampleComponent from './example/ExampleComponent';
|
||||||
|
import ExampleTwoDeepComponent from './example/ExampleTwoDeepComponent';
|
||||||
|
|
||||||
export function Routing(props) {
|
export function Routing(props) {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Route exact path={props.match.url} component={Home} />
|
<Route exact path="/" component={Home} />
|
||||||
<Route path="/PageNotFound" component={PageNotFound} />
|
<Route path="/PageNotFound" component={PageNotFound} />
|
||||||
<Route path="/UnderConstruction" component={UnderConstruction} />
|
<Route path="/UnderConstruction" component={UnderConstruction} />
|
||||||
<Route path="/EnterTheCode" component={EnterTheCode} />
|
<Route path="/EnterTheCode" component={EnterTheCode} />
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import Interactive from 'react-interactive';
|
import Interactive from 'react-interactive';
|
||||||
import { Link } from 'react-router';
|
import { Link } from 'react-router-dom';
|
||||||
import s from '../../styles/app.style';
|
import s from '../../styles/app.style';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import Interactive from 'react-interactive';
|
import Interactive from 'react-interactive';
|
||||||
import { Link } from 'react-router';
|
import { Link } from 'react-router-dom';
|
||||||
import s from '../../styles/exampleComponent.style';
|
import s from '../../styles/exampleComponent.style';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import Interactive from 'react-interactive';
|
import Interactive from 'react-interactive';
|
||||||
import { Link } from 'react-router';
|
import { Link } from 'react-router-dom';
|
||||||
import s from '../../styles/exampleTwoDeepComponent.style';
|
import s from '../../styles/exampleTwoDeepComponent.style';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Interactive from 'react-interactive';
|
import Interactive from 'react-interactive';
|
||||||
import { Link } from 'react-router';
|
import { Link } from 'react-router-dom';
|
||||||
import s from '../../styles/home.style';
|
import s from '../../styles/home.style';
|
||||||
|
|
||||||
function ExampleHome() {
|
function ExampleHome() {
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Interactive from 'react-interactive';
|
import Interactive from 'react-interactive';
|
||||||
import { Link } from 'react-router';
|
import { Link, Route } from 'react-router-dom';
|
||||||
import API from '../../SpreadsheetData';
|
|
||||||
import s from '../../../styles/app.style';
|
|
||||||
import {observer, inject} from 'mobx-react';
|
import {observer, inject} from 'mobx-react';
|
||||||
|
import s from '../../../styles/app.style';
|
||||||
|
import API from '../../SpreadsheetData';
|
||||||
|
import Attack from '../Single/Attack';
|
||||||
|
|
||||||
@inject((stores, props, context) => props) @observer
|
@inject((stores, props, context) => props) @observer
|
||||||
export default class Attacks extends React.Component {
|
export default class Attacks extends React.Component {
|
||||||
|
|
@ -52,7 +53,7 @@ export default class Attacks extends React.Component {
|
||||||
{output}
|
{output}
|
||||||
</div>
|
</div>
|
||||||
<div className="right">
|
<div className="right">
|
||||||
{this.props.children}
|
<Route path={`${this.props.match.url}/:card`} component={Attack} />
|
||||||
</div>
|
</div>
|
||||||
</div>);
|
</div>);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Interactive from 'react-interactive';
|
import Interactive from 'react-interactive';
|
||||||
import { Link } from 'react-router';
|
import { Link } from 'react-router-dom';
|
||||||
import API from '../../SpreadsheetData';
|
import API from '../../SpreadsheetData';
|
||||||
import s from '../../../styles/app.style';
|
import s from '../../../styles/app.style';
|
||||||
import {observer, inject} from 'mobx-react';
|
import {observer, inject} from 'mobx-react';
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Interactive from 'react-interactive';
|
import Interactive from 'react-interactive';
|
||||||
import { Link } from 'react-router';
|
import { Link } from 'react-router-dom';
|
||||||
import API from '../../SpreadsheetData';
|
import API from '../../SpreadsheetData';
|
||||||
import s from '../../../styles/app.style';
|
import s from '../../../styles/app.style';
|
||||||
import {observer, inject} from 'mobx-react';
|
import {observer, inject} from 'mobx-react';
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Interactive from 'react-interactive';
|
import Interactive from 'react-interactive';
|
||||||
import { Link } from 'react-router';
|
import { Link } from 'react-router-dom';
|
||||||
import API from '../../SpreadsheetData';
|
import API from '../../SpreadsheetData';
|
||||||
import s from '../../../styles/app.style';
|
import s from '../../../styles/app.style';
|
||||||
import {observer, inject} from 'mobx-react';
|
import {observer, inject} from 'mobx-react';
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Interactive from 'react-interactive';
|
import Interactive from 'react-interactive';
|
||||||
import { Link } from 'react-router';
|
import { Link } from 'react-router-dom';
|
||||||
import API from '../../SpreadsheetData';
|
import API from '../../SpreadsheetData';
|
||||||
import s from '../../../styles/app.style';
|
import s from '../../../styles/app.style';
|
||||||
import {observer, inject} from 'mobx-react';
|
import {observer, inject} from 'mobx-react';
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Interactive from 'react-interactive';
|
import Interactive from 'react-interactive';
|
||||||
import { Link } from 'react-router';
|
import { Link } from 'react-router-dom';
|
||||||
import API from '../../SpreadsheetData';
|
import API from '../../SpreadsheetData';
|
||||||
import s from '../../../styles/app.style';
|
import s from '../../../styles/app.style';
|
||||||
import {observer, inject} from 'mobx-react';
|
import {observer, inject} from 'mobx-react';
|
||||||
|
|
|
||||||
|
|
@ -2,14 +2,29 @@ import React from 'react';
|
||||||
import { Route } from 'react-router-dom';
|
import { Route } from 'react-router-dom';
|
||||||
import API from '../SpreadsheetData';
|
import API from '../SpreadsheetData';
|
||||||
|
|
||||||
|
import Attacks from './Category/Attacks';
|
||||||
|
import Battlegear from './Category/Battlegear';
|
||||||
|
import Creatures from './Category/Creatures';
|
||||||
|
import Locations from './Category/Locations';
|
||||||
|
import Mugic from './Category/Mugic';
|
||||||
|
import Tribes from './Category/Tribes';
|
||||||
|
|
||||||
export function Routing(props) {
|
export function Routing(props) {
|
||||||
console.log(props);
|
console.log(props);
|
||||||
const match = props.match;
|
const match = props.match;
|
||||||
|
|
||||||
|
const tribes = API.tribes.map((tribe, i) => (
|
||||||
|
<Route key={i} path={`${match.url}/${tribe}`} component={Tribes} />
|
||||||
|
));
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Route exact path={match.url} component={Home} />
|
<Route exact path={match.url} component={Home} />
|
||||||
{/* <Route path={`${match.url}collection`} component={CollectionHome} /> */}
|
<Route path={`${match.url}/Attacks`} component={Attacks} />
|
||||||
|
<Route path={`${match.url}/Battlegear`} component={Battlegear} />
|
||||||
|
<Route path={`${match.url}/Creatures`} component={Creatures} />
|
||||||
|
<Route path={`${match.url}/Locations`} component={Locations} />
|
||||||
|
<Route path={`${match.url}/Mugic`} component={Mugic} />
|
||||||
|
{tribes}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Interactive from 'react-interactive';
|
import Interactive from 'react-interactive';
|
||||||
import { Link } from 'react-router';
|
import { Link } from 'react-router-dom';
|
||||||
import API from '../../SpreadsheetData';
|
import API from '../../SpreadsheetData';
|
||||||
import s from '../../../styles/app.style';
|
import s from '../../../styles/app.style';
|
||||||
import {observer, inject} from 'mobx-react';
|
import {observer, inject} from 'mobx-react';
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Interactive from 'react-interactive';
|
import Interactive from 'react-interactive';
|
||||||
import { Link } from 'react-router';
|
import { Link } from 'react-router-dom';
|
||||||
import API from '../../SpreadsheetData';
|
import API from '../../SpreadsheetData';
|
||||||
import s from '../../../styles/app.style';
|
import s from '../../../styles/app.style';
|
||||||
import {observer, inject} from 'mobx-react';
|
import {observer, inject} from 'mobx-react';
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Interactive from 'react-interactive';
|
import Interactive from 'react-interactive';
|
||||||
import { Link } from 'react-router';
|
import { Link } from 'react-router-dom';
|
||||||
import {PageNotFound} from '../../Snippets';
|
import {PageNotFound} from '../../Snippets';
|
||||||
import API from '../../SpreadsheetData';
|
import API from '../../SpreadsheetData';
|
||||||
import s from '../../../styles/app.style';
|
import s from '../../../styles/app.style';
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Interactive from 'react-interactive';
|
import Interactive from 'react-interactive';
|
||||||
import { Link } from 'react-router';
|
import { Link } from 'react-router-dom';
|
||||||
import API from '../../SpreadsheetData';
|
import API from '../../SpreadsheetData';
|
||||||
import s from '../../../styles/app.style';
|
import s from '../../../styles/app.style';
|
||||||
import {observer, inject} from 'mobx-react';
|
import {observer, inject} from 'mobx-react';
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Interactive from 'react-interactive';
|
import Interactive from 'react-interactive';
|
||||||
import { Link } from 'react-router';
|
import { Link } from 'react-router-dom';
|
||||||
import {PageNotFound} from '../../Snippets';
|
import {PageNotFound} from '../../Snippets';
|
||||||
import API from '../../SpreadsheetData';
|
import API from '../../SpreadsheetData';
|
||||||
import s from '../../../styles/app.style';
|
import s from '../../../styles/app.style';
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user