diff --git a/src/components/Snippets.js b/src/components/Snippets.js
index aaf64c3..8cf08fa 100644
--- a/src/components/Snippets.js
+++ b/src/components/Snippets.js
@@ -14,8 +14,7 @@ export function UnderConstruction(props) {
export function PageNotFound(props) {
return (
- Page not found - the path, {s.code(props.location.pathname)},
- did not match any React Router routes.
+ Page not found - the path, {s.code(props.location.pathname)}, did not match any routes.
);
}
diff --git a/src/components/SpreadsheetData.js b/src/components/SpreadsheetData.js
index 91b67a9..063cf9b 100644
--- a/src/components/SpreadsheetData.js
+++ b/src/components/SpreadsheetData.js
@@ -207,7 +207,7 @@ class API {
}
get tribes() {
- return ["Danian", "Generic", "Mipedian", encodeURIComponent("M'arrillian"), "OverWorld", "UnderWorld"];
+ return ["Danian", "Generic", "Mipedian", "M'arrillian", "OverWorld", "UnderWorld"];
}
// For the conversion of shorthand in database
diff --git a/src/components/portal/Category.js b/src/components/portal/Category.js
new file mode 100644
index 0000000..77c8e88
--- /dev/null
+++ b/src/components/portal/Category.js
@@ -0,0 +1,99 @@
+import React from 'react';
+import Interactive from 'react-interactive';
+import { Link, Route } from 'react-router-dom';
+import {observable} from 'mobx';
+import {observer, inject} from 'mobx-react';
+import s from '../../styles/app.style';
+import API from '../SpreadsheetData';
+import {Loading} from '../Snippets';
+
+@inject((stores, props, context) => props) @observer
+export default class Category extends React.Component {
+ @observable loaded = false;
+
+ constructor(props) {
+ super(props);
+ this.type = props.type.toLowerCase();
+ }
+
+ render() {
+ if (this.loaded == false) {
+ API.LoadDB([{'cards': this.type}, {'portal': this.type}])
+ .then(() => {
+ this.loaded = true;
+ });
+ return ();
+ }
+
+ const create_link = (card, data, i, url) => {
+ return (
+
);
- }
-}
diff --git a/src/components/portal/Category/Tribes.js b/src/components/portal/Tribes.js
similarity index 92%
rename from src/components/portal/Category/Tribes.js
rename to src/components/portal/Tribes.js
index c1af97f..3d4a414 100644
--- a/src/components/portal/Category/Tribes.js
+++ b/src/components/portal/Tribes.js
@@ -4,11 +4,11 @@ import { Link, Route } from 'react-router-dom';
import {observable} from 'mobx';
import {observer, inject} from 'mobx-react';
import loki from 'lokijs';
-import s from '../../../styles/app.style';
-import API from '../../SpreadsheetData';
-import {Loading} from '../../Snippets';
-import Creature from '../Single/Creature';
-import Mugic from '../Single/Mugic';
+import s from '../../styles/app.style';
+import API from '../SpreadsheetData';
+import {Loading} from '../Snippets';
+import Creature from './Single/Creature';
+import Mugic from './Single/Mugic';
@inject((stores, props, context) => props) @observer
export default class Tribes extends React.Component {
diff --git a/src/components/portal/index.js b/src/components/portal/index.js
index 52556c4..38a6f03 100644
--- a/src/components/portal/index.js
+++ b/src/components/portal/index.js
@@ -6,14 +6,16 @@ import {Link, Route} from 'react-router-dom';
import API from '../SpreadsheetData';
import Home from './Home';
import Search from './Search';
-import Category from './Category/Category';
-import Creatures from './Category/Creatures';
-import Mugic from './Category/Mugic';
-import Tribes from './Category/Tribes';
+import {SearchButton} from '../Snippets';
+
+import Category from './Category';
+import Tribes from './Tribes';
+
import Attack from './Single/Attack';
import Battlegear from './Single/Battlegear';
+import Creature from './Single/Creature';
import Location from './Single/Location';
-import {SearchButton} from '../Snippets';
+import Mugic from './Single/Mugic';
import '../../scss/portal.scss';
@@ -37,11 +39,11 @@ function Routing(props) {
return (