diff --git a/apps/meteor/.meteor/packages b/apps/meteor/.meteor/packages index 3d585e080ef..f7b92d4cf9a 100644 --- a/apps/meteor/.meteor/packages +++ b/apps/meteor/.meteor/packages @@ -45,7 +45,6 @@ shell-server@0.6.1 dispatch:run-as-user ostrio:cookies -kadira:flow-router meteorhacks:inject-initial @@ -70,3 +69,4 @@ autoupdate@2.0.0 zodern:types zodern:standard-minifier-js +ostrio:flow-router-extra diff --git a/apps/meteor/.meteor/versions b/apps/meteor/.meteor/versions index 3689b1b0fc5..979496429ff 100644 --- a/apps/meteor/.meteor/versions +++ b/apps/meteor/.meteor/versions @@ -41,7 +41,6 @@ hot-code-push@1.0.5 http@3.0.0 id-map@1.2.0 inter-process-messaging@0.1.2 -kadira:flow-router@2.12.1 localstorage@1.2.1 logging@1.3.5 meteor@2.1.0 @@ -63,6 +62,7 @@ oauth1@1.5.2 oauth2@1.3.3 ordered-dict@1.2.0 ostrio:cookies@2.7.2 +ostrio:flow-router-extra@3.11.0 promise@1.0.0 random@1.2.2 rate-limit@1.1.2 diff --git a/apps/meteor/client/main.ts b/apps/meteor/client/main.ts index 62da42ae419..52e9831864e 100644 --- a/apps/meteor/client/main.ts +++ b/apps/meteor/client/main.ts @@ -1,7 +1,7 @@ import './serviceWorker'; import './startup/accounts'; -import { FlowRouter } from 'meteor/kadira:flow-router'; +import { FlowRouter } from 'meteor/ostrio:flow-router-extra'; FlowRouter.wait(); diff --git a/apps/meteor/client/providers/RouterProvider.tsx b/apps/meteor/client/providers/RouterProvider.tsx index cad11b2266a..0d6e05b52b3 100644 --- a/apps/meteor/client/providers/RouterProvider.tsx +++ b/apps/meteor/client/providers/RouterProvider.tsx @@ -10,7 +10,7 @@ import type { RouteObject, LocationSearch, } from '@rocket.chat/ui-contexts'; -import { FlowRouter } from 'meteor/kadira:flow-router'; +import { FlowRouter } from 'meteor/ostrio:flow-router-extra'; import { Tracker } from 'meteor/tracker'; import type { ReactNode } from 'react'; @@ -125,7 +125,12 @@ const updateFlowRouter = () => { return; } - FlowRouter.initialize(); + FlowRouter.initialize({ + hashbang: false, + page: { + click: true, + }, + }); }; const defineRoutes = (routes: RouteObject[]) => { diff --git a/apps/meteor/definition/externals/meteor/kadira-flow-router.d.ts b/apps/meteor/definition/externals/meteor/ostrio-flow-router.d.ts similarity index 96% rename from apps/meteor/definition/externals/meteor/kadira-flow-router.d.ts rename to apps/meteor/definition/externals/meteor/ostrio-flow-router.d.ts index 946d3d074e2..76ca34333c3 100644 --- a/apps/meteor/definition/externals/meteor/kadira-flow-router.d.ts +++ b/apps/meteor/definition/externals/meteor/ostrio-flow-router.d.ts @@ -1,4 +1,4 @@ -declare module 'meteor/kadira:flow-router' { +declare module 'meteor/ostrio:flow-router-extra' { import type { Subscription } from 'meteor/meteor'; type Context = { @@ -100,12 +100,15 @@ declare module 'meteor/kadira:flow-router' { }; type RouterOptions = { - hashbang?: boolean; + hashbang: boolean; + page: { click: boolean }; }; class Router { constructor(); + _page: typeof page; + route(pathDef: string, options: RouteOptions): Route; route>( @@ -139,7 +142,7 @@ declare module 'meteor/kadira:flow-router' { withTrailingSlash(fn: () => void): Router; - initialize(options?: RouterOptions): void; + initialize: (options: RouterOptions) => void; wait(): void; @@ -178,6 +181,5 @@ declare module 'meteor/kadira:flow-router' { const FlowRouter: Router & { Route: typeof Route; Router: typeof Router; - _page: typeof page; }; }