diff --git a/src/components/Home.js b/src/components/Home.js index 417addf..95ac7a4 100644 --- a/src/components/Home.js +++ b/src/components/Home.js @@ -1,31 +1,7 @@ import React from 'react'; import { Route, Link } from 'react-router-dom'; -/* Components */ -import {PageNotFound, UnderConstruction} from './Snippets'; -import EnterTheCode from './account/EnterTheCode'; -import Collection from './collection/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) { - return ( -
- - - - - - -
- ); -} - -function Home() { +export default function Home() { return (
diff --git a/src/components/index.js b/src/components/index.js index 3d98f4d..87f6843 100644 --- a/src/components/index.js +++ b/src/components/index.js @@ -3,10 +3,13 @@ import { render } from 'react-dom'; import { Link } from 'react-router-dom'; import { BrowserRouter as Router, Route } from 'react-router-dom'; import s from '../styles/app.style'; -import {Routing} from './Home'; -const language = "ENG"; -const bkgrnd = "05"; +/* Components */ +import {PageNotFound, UnderConstruction} from './Snippets'; +import EnterTheCode from './account/EnterTheCode'; +import Collection from './collection/index'; +import Portal from './portal/index'; +import Home from './Home'; render( @@ -17,6 +20,22 @@ render( , document.getElementById('root'), ); +function Routing(props) { + return ( +
+ + + + + + +
+ ); +} + +const language = "ENG"; +const bkgrnd = "05"; + function Base(props) { const children = ; diff --git a/src/components/portal/Category/Creatures.js b/src/components/portal/Category/Creatures.js index c2fa572..88a8261 100644 --- a/src/components/portal/Category/Creatures.js +++ b/src/components/portal/Category/Creatures.js @@ -96,13 +96,17 @@ export default class Creatures extends React.Component { ); }); + const tribes = ["Danian", "Mipedian", "OverWorld", "UnderWorld"].map((tribe, i) => ( + + )); + return (
{path[2]}
{output}
- + {tribes}
); } diff --git a/src/components/portal/Category/Mugic.js b/src/components/portal/Category/Mugic.js index 1068444..1c768e4 100644 --- a/src/components/portal/Category/Mugic.js +++ b/src/components/portal/Category/Mugic.js @@ -100,13 +100,17 @@ export default class Mugic extends React.Component { ); }); + const tribes = ["Danian", "Mipedian", "OverWorld", "UnderWorld"].map((tribe, i) => ( + + )); + return (
{path[2]}
{output}
- + {tribes}
); } diff --git a/src/components/portal/Category/Tribes.js b/src/components/portal/Category/Tribes.js index b128ca1..e720f12 100644 --- a/src/components/portal/Category/Tribes.js +++ b/src/components/portal/Category/Tribes.js @@ -1,9 +1,11 @@ import React from 'react'; import Interactive from 'react-interactive'; -import { Link } from 'react-router-dom'; -import API from '../../SpreadsheetData'; -import s from '../../../styles/app.style'; +import { Link, Route } from 'react-router-dom'; import {observer, inject} from 'mobx-react'; +import s from '../../../styles/app.style'; +import API from '../../SpreadsheetData'; +import Creature from '../Single/Creature'; +import Mugic from '../Single/Mugic'; @inject((stores, props, context) => props) @observer export default class Tribes extends React.Component { @@ -13,9 +15,6 @@ export default class Tribes extends React.Component { // to display the respective subcategories // -> /{Tribe}/Mugic || /{Tribe}/Creatures render() { - if (this.props.children) { - return (
{this.props.children}
); - } const store = API; @@ -52,13 +51,19 @@ export default class Tribes extends React.Component { ); } - return ( -
-

{tribe}

-
- Creatures
- Mugic + const output = (() => ( +
Test
+ ))(); + + return (
+
+
{path[2]}
+ {output}
- ); +
+ + +
+
); } } diff --git a/src/components/portal/Home.js b/src/components/portal/Home.js index d936e57..6984e2f 100644 --- a/src/components/portal/Home.js +++ b/src/components/portal/Home.js @@ -1,35 +1,7 @@ import React from 'react'; -import { Route } from 'react-router-dom'; 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) { - console.log(props); - const match = props.match; - - const tribes = API.tribes.map((tribe, i) => ( - - )); - return ( -
- - - - - - - {tribes} -
- ); -} - -class Home extends React.Component { +export default class Home extends React.Component { componentDidMount() { this.coin = null; diff --git a/src/components/portal/index.js b/src/components/portal/index.js index 0931db6..23949ca 100644 --- a/src/components/portal/index.js +++ b/src/components/portal/index.js @@ -1,9 +1,17 @@ import React from 'react'; import {observable} from "mobx"; import {observer, inject} from 'mobx-react'; -import {Link} from 'react-router-dom'; -import {Routing} from './Home'; +import {Link, Route} from 'react-router-dom'; + +import API from '../SpreadsheetData'; +import Home from './Home'; import Search from './Search'; +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'; @inject((stores, props, context) => props) @observer export default class Base extends React.Component { @@ -20,12 +28,32 @@ export default class Base extends React.Component { } } +function Routing(props) { + console.log(props); + const match = props.match; + + const tribes = API.tribes.map((tribe, i) => ( + + )); + return ( +
+ + + + + + + {tribes} +
+ ); +} + function Header() { const types = (() => { return (
  • - Types + Types
    Attacks Battlegear