[change] creature categories

fix routes
This commit is contained in:
Daniel 2017-09-11 10:04:59 -04:00
parent 075bb6ed3a
commit 09c9e3f2dc
4 changed files with 81 additions and 38 deletions

File diff suppressed because one or more lines are too long

View File

@ -39,10 +39,11 @@ function App({ children, routes }) {
let location = "#";
switch (asParams) {
case 'collect':
location = 'http://www.tradecardsonline.com/im/editCollection/collection_type/1';
break;
// case 'register' :
// location ='/Registration.aspx';
// break;
// case 'register' :
// location ='/Registration.aspx';
// break;
case 'build':
location = 'http://www.tradecardsonline.com/?action=selectCard&goal=DK&game_id=82';
break;
@ -54,7 +55,7 @@ function App({ children, routes }) {
location = 'http://www.tradecardsonline.com/?action=selectCard&goal=&game_id=82';
break;
case 'portal':
location = ('https://chaoticbackup.github.io/portal/')
location = ('/portal/')
break;
case 'forum':
location = 'http://chaoticbackup.forumotion.com';
@ -63,7 +64,7 @@ function App({ children, routes }) {
location = 'http://www.tradecardsonline.com/?action=selectCard&goal=DK&game_id=82';
break;
default:
location = '/UnderConstructionPage.aspx';
location = '/portal/UnderConstruction/';
break;
}
return location;

View File

@ -18,7 +18,7 @@ export default class SingleCreature extends React.Component {
componentDidMount() {
var self = this;
API.getSpreadsheet(this.url, function(data) {
console.log(data);
// console.log(data);
self.setState({creatures: data });
});
}
@ -59,7 +59,6 @@ export default class SingleCreature extends React.Component {
return(<PageNotFound location={this.location}/>);
}
// TODO
var creature = null;
this.state.creatures.map((item, i) => {
// console.log(item.title, path[4], item.title.$t == path[4]);
@ -70,26 +69,57 @@ export default class SingleCreature extends React.Component {
return(<PageNotFound location={this.location}/>);
}
// const creature = this.state.creature.map((item, i) => {
// return (
// <div>{item.title.$t}</div>
// );
// });
return(
<div className={"creature " + tribe.toLowerCase()}>
<UnderConstruction location={this.location}/>
{creature.gsx$name.$t}
<h1>{creature.gsx$name.$t}</h1>
<img className="splash" src={API.image + creature.gsx$splash.$t}></img>
<p>{creature.gsx$appearance.$t}</p>
<p>{creature.gsx$background.$t}</p>
<p>{creature.gsx$details.$t}</p>
<p>{creature.gsx$favoritebattlegear.$t}</p>
<p>{creature.gsx$favoritelocation.$t}</p>
<p>{creature.gsx$heightfeetinch.$t}</p>
<p>{creature.gsx$specialabilities.$t}</p>
<p>{creature.gsx$weightpounds.$t}</p>
<hr />
<div>
<strong>Appearance:</strong><br />
{creature.gsx$appearance.$t}
</div>
<hr />
<div>
<strong>Background:</strong><br />
{creature.gsx$background.$t}
</div>
<hr />
<div>
<strong>Details:</strong><br />
{creature.gsx$details.$t}
</div>
<hr />
<div>
<strong>Favorite Battlegear(s):</strong><br />
{creature.gsx$battlegear.$t}
</div>
<hr />
<div>
<strong>Favorite Location(s):</strong><br />
{creature.gsx$location.$t}
</div>
<hr />
<div>
<strong>Height (ft):</strong><br />
{creature.gsx$height.$t}
</div>
<hr />
<div>
<strong>Special Abilities:</strong><br />
{creature.gsx$specialabilities.$t}
</div>
<hr />
<div>
<strong>Weight (lb):</strong><br />
{creature.gsx$weight.$t}
</div>
</div>
);
}
}
// const creature = this.state.creature.map((item, i) => {
// return (
// <div>{item.title.$t}</div>
// );
// });

View File

@ -79,32 +79,44 @@ const routes = (
</Route>
<Route path="Overworld" component={Tribes}>
<Route path="Creatures" component={SingleCreature} />
<Route path="Creatures" component={Creatures}>
<Route path="*" component={SingleCreature} />
</Route>
<Route path="Mugic" component={UnderConstruction} />
</Route>
<Route path="Underworld" component={Tribes}>
<Route path="Creatures" component={SingleCreature} />
<Route path="Creatures" component={Creatures}>
<Route path="*" component={SingleCreature} />
</Route>
<Route path="Mugic" component={UnderConstruction} />
</Route>
<Route path="Mipedian" component={Tribes}>
<Route path="Creatures" component={SingleCreature} />
<Route path="Creatures" component={Creatures}>
<Route path="*" component={SingleCreature} />
</Route>
<Route path="Mugic" component={UnderConstruction} />
</Route>
<Route path="Danian" component={Tribes}>
<Route path="Creatures" component={SingleCreature} />
<Route path="Creatures" component={Creatures}>
<Route path="*" component={SingleCreature} />
</Route>
<Route path="Mugic" component={UnderConstruction} />
</Route>
<Route path="Marrillian" component={Tribes}>
<Route path="Creatures" component={SingleCreature} />
<Route path="Creatures" component={Creatures}>
<Route path="*" component={SingleCreature} />
</Route>
<Route path="Mugic" component={UnderConstruction} />
</Route>
<Route path="Generic" component={Tribes}>
<Route path="Creatures" component={SingleCreature} />
<Route path="Creatures" component={Creatures}>
<Route path="*" component={SingleCreature} />
</Route>
<Route path="Mugic" component={UnderConstruction} />
</Route>