1
0
mirror of https://github.com/oceanprotocol/commons.git synced 2023-03-15 18:03:00 +01:00
commons/client/src/Routes.tsx

39 lines
1.3 KiB
TypeScript
Raw Normal View History

2019-01-23 11:15:27 +01:00
import React from 'react'
import { Route, Switch } from 'react-router-dom'
2019-10-10 11:19:36 +02:00
import { showChannels } from './config'
2019-01-23 14:43:41 +01:00
2019-02-08 14:22:40 +01:00
import About from './routes/About'
import Home from './routes/Home'
import NotFound from './routes/NotFound'
2019-02-12 14:07:22 +01:00
import Publish from './routes/Publish/'
2019-02-08 14:22:40 +01:00
import Search from './routes/Search'
2019-02-28 17:12:48 +01:00
import Faucet from './routes/Faucet'
2019-03-25 16:42:37 +01:00
import History from './routes/History'
import Channels from './routes/Channels'
2019-02-08 14:22:40 +01:00
import Styleguide from './routes/Styleguide'
import Asset from './components/templates/Asset'
import Channel from './components/templates/Channel'
const Routes = () => (
<Switch>
<Route component={Home} exact path="/" />
<Route component={Styleguide} path="/styleguide" />
<Route component={About} path="/about" />
<Route component={Publish} path="/publish" />
<Route component={Search} path="/search" />
<Route component={Asset} path="/asset/:did" />
<Route component={Faucet} path="/faucet" />
<Route component={History} path="/history" />
2019-10-10 11:19:36 +02:00
{showChannels && (
<>
<Route component={Channels} exact path="/channels" />
<Route component={Channel} path="/channels/:channel" />
</>
)}
<Route component={NotFound} />
</Switch>
)
export default Routes