2020-08-03 16:49:40 +02:00
|
|
|
import React from 'react';
|
2020-08-04 15:15:08 +02:00
|
|
|
import { Switch, Route } from 'react-router-dom';
|
2021-05-05 11:28:17 +02:00
|
|
|
import { NotFound } from '@strapi/helper-plugin';
|
2020-08-04 13:07:55 +02:00
|
|
|
import pluginId from '../../pluginId';
|
2020-08-03 16:49:40 +02:00
|
|
|
|
2020-08-04 15:15:08 +02:00
|
|
|
import ProtectedRolesListPage from './ProtectedListPage';
|
2020-08-04 13:07:55 +02:00
|
|
|
import ProtectedRolesEditPage from './ProtectedEditPage';
|
|
|
|
|
import ProtectedRolesCreatePage from './ProtectedCreatePage';
|
|
|
|
|
|
|
|
|
|
const Roles = () => {
|
|
|
|
|
return (
|
|
|
|
|
<Switch>
|
2021-05-05 11:28:17 +02:00
|
|
|
<Route path={`/settings/${pluginId}/roles/new`} component={ProtectedRolesCreatePage} exact />
|
|
|
|
|
<Route path={`/settings/${pluginId}/roles/:id`} component={ProtectedRolesEditPage} exact />
|
|
|
|
|
<Route path={`/settings/${pluginId}/roles`} component={ProtectedRolesListPage} exact />
|
2020-08-04 13:07:55 +02:00
|
|
|
<Route path="" component={NotFound} />
|
|
|
|
|
</Switch>
|
|
|
|
|
);
|
2020-08-03 16:49:40 +02:00
|
|
|
};
|
|
|
|
|
|
2020-08-04 13:07:55 +02:00
|
|
|
export default Roles;
|