350 open graph react #360

Merged
bones7242 merged 30 commits from 350-open-graph-react into master 2018-02-24 17:55:00 +01:00
3 changed files with 11 additions and 38 deletions
Showing only changes of commit 9bf45975da - Show all commits

View file

@ -1,13 +1,20 @@
import React from 'react';
import { Route, Switch } from 'react-router-dom';
import routes from './routes';
import PublishPage from 'components/PublishPage';
import AboutPage from 'components/AboutPage';
import LoginPage from 'containers/LoginPage';
import ShowPage from 'containers/ShowPage';
import FourOhFourPage from 'components/FourOhFourPage';
const App = () => {
return (
<Switch>
{routes.map((route, index) => (
<Route key={index}{...route} />
))}
<Route exact path='/' component={PublishPage} />
<Route exact path='/about' component={AboutPage} />
<Route exact path='/login' component={LoginPage} />
<Route exact path='/:identifier/:claim' component={ShowPage} />
<Route exact path='/:claim' component={ShowPage} />
<Route component={FourOhFourPage} />
</Switch>
);
};

View file

@ -8,7 +8,6 @@ class AssetDisplay extends React.Component {
this.props.onFileRequest(name, claimId);
}
render () {
console.log('rendering assetdisplay', this.props);
const { status, error, asset: { claimData: { name, claimId, contentType, fileExt, thumbnail } } } = this.props;
return (
<div id="asset-display-component">

View file

@ -1,33 +0,0 @@
import PublishPage from 'components/PublishPage';
import AboutPage from 'components/AboutPage';
import LoginPage from 'containers/LoginPage';
import ShowPage from 'containers/ShowPage';
import FourOhFourPage from 'components/FourOhFourPage';
const routes = [
{ path : '/',
exact : true,
component: PublishPage,
},
{ path : '/about',
exact : true,
component: AboutPage,
},
{ path : '/login',
exact : true,
component: LoginPage,
},
{ path : '/:identifier/:claim',
exact : true,
component: ShowPage,
},
{ path : '/:claim',
exact : true,
component: ShowPage,
},
{
component: FourOhFourPage,
},
];
export default routes;