import React from 'react' ; import { createHashHistory } from 'history' ; import { Redirect , Route , Router , Switch } from 'react-router-dom' ; import { ListingRoute } from './apps/listing_route' ; import { GraphServices } from './application' ; import { WorkspaceRoute } from './apps/workspace_route' ; export const graphRouter = ( deps ) => { const history = createHashHistory ( ) ; return ( < Router history = { history } > < Switch > < Route exact path = "/home" > < ListingRoute deps = { deps } /> < /Route> < Route path = "/workspace/:id?" > < WorkspaceRoute deps = { deps } /> < /Route> < Route > < Redirect exact to = "/home" / > < /Route> < /Switch> < /Router>); } ;