Skip to content

Commit

Permalink
fix vite-basics module
Browse files Browse the repository at this point in the history
  • Loading branch information
mshabarov committed Apr 9, 2024
1 parent b021791 commit b668bfd
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions flow-tests/test-frontend/vite-basics/src/main/frontend/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@ import { createBrowserRouter, RouteObject } from 'react-router-dom';
import { serverSideRoutes } from 'Frontend/generated/flow/Flow';
import ReactComponents from './ReactComponents';

export const routes = [
{ path: 'react-components', element: <ReactComponents/> },
...serverSideRoutes
] as RouteObject[];

export default createBrowserRouter(routes);
function build() {
const routes = [
{ path: 'react-components', element: <ReactComponents/> },
...serverSideRoutes
] as RouteObject[];
return {
router: createBrowserRouter(routes),
routes
};
}
export const { router, routes } = build()

0 comments on commit b668bfd

Please sign in to comment.