import React, { Component } from 'react';
import { Route } from 'react-router';
import { Layout } from './components/Layout';
import { Articles } from './components/Articles';
import { Article } from './components/Article';
import { Edit } from './components/Edit';
import { Home } from './components/Home';
import ApiAuthorizationRoutes from './components/api-authorization/ApiAuthorizationRoutes';
import { ApplicationPaths } from './components/api-authorization/ApiAuthorizationConstants';
import { Redirect } from 'react-router'
import './custom.css'
export default class App extends Component {
static displayName = App.name;
render() {
return (
<Layout>
<Route
exact
path="/"
render={() => {
return (
<Redirect to="/📜"
/>
)
}}
/>
<Route exact path='/' component={Articles} />
<Route exact path='/📜'
component={Articles} />
<Route exact path='/👁/:id'
component={Article} />
<Route exact path='/✍/:id' component={Edit} />
<Route exact path='/home' component={Home} />
<Route
path={ApplicationPaths.ApiAuthorizationPrefix}
component={ApiAuthorizationRoutes} />
</Layout>
);
}
}
|