Skip to content
This repository has been archived by the owner on Feb 12, 2025. It is now read-only.

Commit

Permalink
Add route to RemovePortfolioItems component
Browse files Browse the repository at this point in the history
  • Loading branch information
Hilda Stastna committed Nov 30, 2018
1 parent 12537aa commit 3cbe34d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@ import some from 'lodash/some';
const ServicePortal = asyncComponent(() => import('./SmartComponents/ServicePortal/ServicePortal'));
const PlatformItems = asyncComponent(() => import('./SmartComponents/Platform/PlatformItems'));
const PortfolioItems = asyncComponent(() => import('./SmartComponents/Portfolio/PortfolioItems'));
const RemovePortfolioItems = asyncComponent(() => import('./SmartComponents/Portfolio/RemovePortfolioItems'));
const Orders = asyncComponent(() => import('./SmartComponents/Order/Orders'));

const paths = {
service_portal: '/service_portal',
platform_items: '/platform_items/:filter?',
portfolio_items: '/portfolio_items/:filter?',
remove_portfolio_items: '/portfolio_items/portfolio=18/remove', // TODO, id of portfolio
orders: '/orders'
};

Expand Down Expand Up @@ -63,6 +65,7 @@ export const Routes = (props: Props) => {
<InsightsRoute exact path={ paths.service_portal } component={ ServicePortal } rootClass="service_portal" />
<InsightsRoute exact path={ paths.platform_items } component={ PlatformItems } rootClass="platform_items" />
<InsightsRoute exact path={ paths.portfolio_items } component={ PortfolioItems } rootClass="portfolio_items" />
<InsightsRoute path={ paths.remove_portfolio_items } component={ RemovePortfolioItems } />
<InsightsRoute exact path={ paths.orders } component={ Orders } rootClass="service_portal" />
{ /* Finally, catch all unmatched routes */ }
<Route render={ () => (some(paths, p => p === path) ? null : <Redirect to={ paths.service_portal } />) } />
Expand Down

0 comments on commit 3cbe34d

Please sign in to comment.