version 1.0
This commit is contained in:
19
src/main/frontend/generated/routes.tsx
Normal file
19
src/main/frontend/generated/routes.tsx
Normal file
@@ -0,0 +1,19 @@
|
||||
/******************************************************************************
|
||||
* This file is auto-generated by Vaadin.
|
||||
* It configures React Router automatically by adding server-side (Flow) routes,
|
||||
* which is enough for Vaadin Flow applications.
|
||||
* Once any `.tsx` or `.jsx` React routes are added into
|
||||
* `src/main/frontend/views/` directory, this route configuration is
|
||||
* re-generated automatically by Vaadin.
|
||||
******************************************************************************/
|
||||
import { createBrowserRouter, RouteObject } from 'react-router';
|
||||
import { serverSideRoutes } from 'Frontend/generated/flow/Flow';
|
||||
|
||||
function build() {
|
||||
const routes = [...serverSideRoutes] as RouteObject[];
|
||||
return {
|
||||
router: createBrowserRouter([...routes], { basename: new URL(document.baseURI).pathname }),
|
||||
routes
|
||||
};
|
||||
}
|
||||
export const { router, routes } = build()
|
||||
Reference in New Issue
Block a user