Skip to content

Commit 0ce3d45

Browse files
chore: replace the kadira flow router with the ostrio flow router (#35175)
1 parent 407da81 commit 0ce3d45

File tree

5 files changed

+16
-9
lines changed

5 files changed

+16
-9
lines changed

apps/meteor/.meteor/packages

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ shell-server@0.6.1
4545
dispatch:run-as-user
4646
ostrio:cookies
4747

48-
kadira:flow-router
4948

5049
meteorhacks:inject-initial
5150

@@ -70,3 +69,4 @@ autoupdate@2.0.0
7069

7170
zodern:types
7271
zodern:standard-minifier-js
72+
ostrio:flow-router-extra

apps/meteor/.meteor/versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ hot-code-push@1.0.5
4141
http@3.0.0
4242
id-map@1.2.0
4343
inter-process-messaging@0.1.2
44-
kadira:flow-router@2.12.1
4544
localstorage@1.2.1
4645
logging@1.3.5
4746
meteor@2.1.0
@@ -63,6 +62,7 @@ oauth1@1.5.2
6362
oauth2@1.3.3
6463
ordered-dict@1.2.0
6564
ostrio:cookies@2.7.2
65+
ostrio:flow-router-extra@3.11.0
6666
promise@1.0.0
6767
random@1.2.2
6868
rate-limit@1.1.2

apps/meteor/client/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import './serviceWorker';
22
import './startup/accounts';
33

4-
import { FlowRouter } from 'meteor/kadira:flow-router';
4+
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
55

66
FlowRouter.wait();
77

apps/meteor/client/providers/RouterProvider.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import type {
1010
RouteObject,
1111
LocationSearch,
1212
} from '@rocket.chat/ui-contexts';
13-
import { FlowRouter } from 'meteor/kadira:flow-router';
13+
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
1414
import { Tracker } from 'meteor/tracker';
1515
import type { ReactNode } from 'react';
1616

@@ -125,7 +125,12 @@ const updateFlowRouter = () => {
125125
return;
126126
}
127127

128-
FlowRouter.initialize();
128+
FlowRouter.initialize({
129+
hashbang: false,
130+
page: {
131+
click: true,
132+
},
133+
});
129134
};
130135

131136
const defineRoutes = (routes: RouteObject[]) => {

apps/meteor/definition/externals/meteor/kadira-flow-router.d.ts renamed to apps/meteor/definition/externals/meteor/ostrio-flow-router.d.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
declare module 'meteor/kadira:flow-router' {
1+
declare module 'meteor/ostrio:flow-router-extra' {
22
import type { Subscription } from 'meteor/meteor';
33

44
type Context = {
@@ -100,12 +100,15 @@ declare module 'meteor/kadira:flow-router' {
100100
};
101101

102102
type RouterOptions = {
103-
hashbang?: boolean;
103+
hashbang: boolean;
104+
page: { click: boolean };
104105
};
105106

106107
class Router {
107108
constructor();
108109

110+
_page: typeof page;
111+
109112
route<TRouteName extends string>(pathDef: string, options: RouteOptions<TRouteName>): Route<TRouteName, undefined>;
110113

111114
route<TRouteName extends string, TGroup extends Group<string>>(
@@ -139,7 +142,7 @@ declare module 'meteor/kadira:flow-router' {
139142

140143
withTrailingSlash(fn: () => void): Router;
141144

142-
initialize(options?: RouterOptions): void;
145+
initialize: (options: RouterOptions) => void;
143146

144147
wait(): void;
145148

@@ -178,6 +181,5 @@ declare module 'meteor/kadira:flow-router' {
178181
const FlowRouter: Router & {
179182
Route: typeof Route;
180183
Router: typeof Router;
181-
_page: typeof page;
182184
};
183185
}

0 commit comments

Comments
 (0)