github.com/freiheit-com/kuberpult@v1.24.2-0.20240328135542-315d5630abe6/services/frontend-service/src/Routes.tsx (about)

     1  /*This file is part of kuberpult.
     2  
     3  Kuberpult is free software: you can redistribute it and/or modify
     4  it under the terms of the Expat(MIT) License as published by
     5  the Free Software Foundation.
     6  
     7  Kuberpult is distributed in the hope that it will be useful,
     8  but WITHOUT ANY WARRANTY; without even the implied warranty of
     9  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    10  MIT License for more details.
    11  
    12  You should have received a copy of the MIT License
    13  along with kuberpult. If not, see <https://directory.fsf.org/wiki/License:Expat>.
    14  
    15  Copyright 2023 freiheit.com*/
    16  import { App } from './ui/App';
    17  import { Routes as ReactRoutes, Route } from 'react-router-dom';
    18  import React from 'react';
    19  
    20  const routes = [
    21      {
    22          // If none of the above paths are matched, then this route is chosen
    23          path: '/*',
    24          element: <App />,
    25      },
    26  ];
    27  
    28  export const Routes: React.FC = () => (
    29      <ReactRoutes>
    30          {routes.map((route) => (
    31              <Route key={route.path} path={route.path} element={route.element} />
    32          ))}
    33      </ReactRoutes>
    34  );