350 open graph react #360
3 changed files with 11 additions and 38 deletions
15
react/app.js
15
react/app.js
|
@ -1,13 +1,20 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Route, Switch } from 'react-router-dom';
|
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 = () => {
|
const App = () => {
|
||||||
return (
|
return (
|
||||||
<Switch>
|
<Switch>
|
||||||
{routes.map((route, index) => (
|
<Route exact path='/' component={PublishPage} />
|
||||||
<Route key={index}{...route} />
|
<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>
|
</Switch>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -8,7 +8,6 @@ class AssetDisplay extends React.Component {
|
||||||
this.props.onFileRequest(name, claimId);
|
this.props.onFileRequest(name, claimId);
|
||||||
}
|
}
|
||||||
render () {
|
render () {
|
||||||
console.log('rendering assetdisplay', this.props);
|
|
||||||
const { status, error, asset: { claimData: { name, claimId, contentType, fileExt, thumbnail } } } = this.props;
|
const { status, error, asset: { claimData: { name, claimId, contentType, fileExt, thumbnail } } } = this.props;
|
||||||
return (
|
return (
|
||||||
<div id="asset-display-component">
|
<div id="asset-display-component">
|
||||||
|
|
|
@ -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;
|
|
Loading…
Reference in a new issue