Skip to content

Commit 03106e6

Browse files
caaladormshabarov
andauthored
fix: correct sample in file (#19190)
Make the sample code return the correct type of RouteObject[] instead of only RouteObject Fixes #19178 Co-authored-by: Mikhail Shabarov <61410877+mshabarov@users.noreply.github.com>
1 parent 75181fc commit 03106e6

File tree

1 file changed

+8
-4
lines changed
  • flow-server/src/main/resources/com/vaadin/flow/server/frontend

1 file changed

+8
-4
lines changed

flow-server/src/main/resources/com/vaadin/flow/server/frontend/routes.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,18 +41,22 @@ export const { router, routes } = new RouterConfigurationBuilder()
4141
// To define routes manually or adding an individual route, use the
4242
// following code and remove (1):
4343
// .withReactRoutes(
44-
// {
44+
// [
45+
// {
4546
// element: <MainLayout />,
4647
// handle: { title: 'Main' },
4748
// children: [
4849
// { path: '/hilla', element: <HillaView />, handle: { title: 'Hilla' } }
4950
// ],
50-
// },
51-
// { path: '/login', element: <Login />, handle: { title: 'Login' } }
51+
// },
52+
// { path: '/login', element: <Login />, handle: { title: 'Login' } }
53+
// ]
5254
// )
5355
// OR
5456
// .withReactRoutes(
55-
// { path: '/login', element: <Login />, handle: { title: 'Login' } },
57+
// [
58+
// { path: '/login', element: <Login />, handle: { title: 'Login' } }
59+
// ]
5660
// )
5761
.withFallback(Flow)
5862
// Optional method that adds an authentication for routes.

0 commit comments

Comments
 (0)