Upgrade to React Router v6 (#2919)
This commit is contained in:
@@ -14,8 +14,8 @@ import {
|
||||
} from "react";
|
||||
import { type MatrixClient } from "matrix-js-sdk/src/client";
|
||||
import { Trans, useTranslation } from "react-i18next";
|
||||
import { useHistory } from "react-router-dom";
|
||||
import { Button, Heading, Text } from "@vector-im/compound-web";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
|
||||
import styles from "./CallEndedView.module.css";
|
||||
import feedbackStyle from "../input/FeedbackInput.module.css";
|
||||
@@ -46,7 +46,7 @@ export const CallEndedView: FC<Props> = ({
|
||||
reconnect,
|
||||
}) => {
|
||||
const { t } = useTranslation();
|
||||
const history = useHistory();
|
||||
const navigate = useNavigate();
|
||||
|
||||
const { displayName } = useProfile(client);
|
||||
const [surveySubmitted, setSurveySubmitted] = useState(false);
|
||||
@@ -76,12 +76,12 @@ export const CallEndedView: FC<Props> = ({
|
||||
setSurveySubmitted(true);
|
||||
} else if (!confineToRoom) {
|
||||
// if the user already has an account immediately go back to the home screen
|
||||
history.push("/");
|
||||
navigate("/");
|
||||
}
|
||||
}, 1000);
|
||||
}, 1000);
|
||||
},
|
||||
[endedCallId, history, isPasswordlessUser, confineToRoom, starRating],
|
||||
[endedCallId, navigate, isPasswordlessUser, confineToRoom, starRating],
|
||||
);
|
||||
|
||||
const createAccountDialog = isPasswordlessUser && (
|
||||
|
||||
Reference in New Issue
Block a user