UNPKG

@kiwicom/smart-faq

Version:

Smart FAQ

30 lines (24 loc) 698 B
// @flow import { Route, Switch } from 'react-router-dom'; import * as React from 'react'; import Intro from './IntroPage/index'; import ContentPage from './common/layout/ContentPage'; import QueryParamRouter from './helpers/QueryParamRouter'; type Props = {| route: string, |}; const Routes = (props: Props) => { return ( <QueryParamRouter route={props.route}> <Switch> <Route exact path="/" component={Intro} /> <Route exact path="/faq/:categoryId?" component={ContentPage} /> <Route path="/faq/:categoryId/article/:articleId" component={ContentPage} /> </Switch> </QueryParamRouter> ); }; export default Routes;