mirror of
https://github.com/chaoticbackup/chaoticbackup.github.io.git
synced 2026-03-22 01:34:20 -05:00
[change] creature categories
fix routes
This commit is contained in:
parent
075bb6ed3a
commit
09c9e3f2dc
File diff suppressed because one or more lines are too long
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
// );
|
||||
// });
|
||||
|
|
|
|||
24
src/index.js
24
src/index.js
|
|
@ -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>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user