github.com/minio/console@v1.4.1/web-app/src/screens/Console/Policies/Policies.tsx (about)

     1  // You should have received a copy of the GNU Affero General Public License
     2  // along with this program.  If not, see <http://www.gnu.org/licenses/>.
     3  
     4  import React from "react";
     5  import { Route, Routes } from "react-router-dom";
     6  
     7  import NotFoundPage from "../../NotFoundPage";
     8  import withSuspense from "../Common/Components/withSuspense";
     9  
    10  const ListPolicies = withSuspense(React.lazy(() => import("./ListPolicies")));
    11  const PolicyDetails = withSuspense(React.lazy(() => import("./PolicyDetails")));
    12  
    13  const Policies = () => {
    14    return (
    15      <Routes>
    16        <Route path={"/"} element={<ListPolicies />} />
    17        <Route path={`:policyName`} element={<PolicyDetails />} />
    18        <Route element={<NotFoundPage />} />
    19      </Routes>
    20    );
    21  };
    22  
    23  export default Policies;