Upgrade to React Router v6 (#2919)
This commit is contained in:
@@ -11,8 +11,7 @@ import { type MatrixClient } from "matrix-js-sdk/src/client";
|
||||
import { type MatrixRTCSession } from "matrix-js-sdk/src/matrixrtc";
|
||||
import { of } from "rxjs";
|
||||
import { JoinRule, type RoomState } from "matrix-js-sdk/src/matrix";
|
||||
import { Router } from "react-router-dom";
|
||||
import { createBrowserHistory } from "history";
|
||||
import { BrowserRouter } from "react-router-dom";
|
||||
import userEvent from "@testing-library/user-event";
|
||||
import { type RelationsContainer } from "matrix-js-sdk/src/models/relations-container";
|
||||
|
||||
@@ -78,7 +77,6 @@ function createGroupCallView(widget: WidgetHelpers | null): {
|
||||
rtcSession: MockRTCSession;
|
||||
getByText: ReturnType<typeof render>["getByText"];
|
||||
} {
|
||||
const history = createBrowserHistory();
|
||||
const client = {
|
||||
getUser: () => null,
|
||||
getUserId: () => localRtcMember.sender,
|
||||
@@ -111,7 +109,7 @@ function createGroupCallView(widget: WidgetHelpers | null): {
|
||||
video: { enabled: false },
|
||||
} as MuteStates;
|
||||
const { getByText } = render(
|
||||
<Router history={history}>
|
||||
<BrowserRouter>
|
||||
<GroupCallView
|
||||
client={client}
|
||||
isPasswordlessUser={false}
|
||||
@@ -123,7 +121,7 @@ function createGroupCallView(widget: WidgetHelpers | null): {
|
||||
muteStates={muteState}
|
||||
widget={widget}
|
||||
/>
|
||||
</Router>,
|
||||
</BrowserRouter>,
|
||||
);
|
||||
return {
|
||||
getByText,
|
||||
|
||||
Reference in New Issue
Block a user