chore: replace the kadira flow router with the ostrio flow router (#35175)

pull/34890/head^2
julio-rocketchat 11 months ago committed by GitHub
parent 407da81dc4
commit 0ce3d45172
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      apps/meteor/.meteor/packages
  2. 2
      apps/meteor/.meteor/versions
  3. 2
      apps/meteor/client/main.ts
  4. 9
      apps/meteor/client/providers/RouterProvider.tsx
  5. 10
      apps/meteor/definition/externals/meteor/ostrio-flow-router.d.ts

@ -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

@ -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

@ -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();

@ -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[]) => {

@ -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<TRouteName extends string>(pathDef: string, options: RouteOptions<TRouteName>): Route<TRouteName, undefined>;
route<TRouteName extends string, TGroup extends Group<string>>(
@ -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;
};
}
Loading…
Cancel
Save