mirror of
https://github.com/vector-im/element-call.git
synced 2026-02-11 04:27:03 +00:00
Update dependency react-router-dom to v7 (#1624)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Hugh Nimmo-Smith <hughns@element.io>
This commit is contained in:
@@ -16,6 +16,7 @@ import { type MatrixClient } from "matrix-js-sdk/src/client";
|
||||
import { Trans, useTranslation } from "react-i18next";
|
||||
import { Button, Heading, Text } from "@vector-im/compound-web";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
|
||||
import styles from "./CallEndedView.module.css";
|
||||
import feedbackStyle from "../input/FeedbackInput.module.css";
|
||||
@@ -76,7 +77,9 @@ export const CallEndedView: FC<Props> = ({
|
||||
setSurveySubmitted(true);
|
||||
} else if (!confineToRoom) {
|
||||
// if the user already has an account immediately go back to the home screen
|
||||
navigate("/");
|
||||
navigate("/")?.catch((error) => {
|
||||
logger.error("Failed to navigate to /", error);
|
||||
});
|
||||
}
|
||||
}, 1000);
|
||||
}, 1000);
|
||||
|
||||
@@ -259,13 +259,13 @@ export const GroupCallView: FC<Props> = ({
|
||||
sendInstantly && audioPromise ? audioPromise : undefined,
|
||||
)
|
||||
// Only sends matrix leave event. The Livekit session will disconnect once the ActiveCall-view unmounts.
|
||||
.then(() => {
|
||||
.then(async () => {
|
||||
if (
|
||||
!isPasswordlessUser &&
|
||||
!confineToRoom &&
|
||||
!PosthogAnalytics.instance.isEnabled()
|
||||
) {
|
||||
navigate("/");
|
||||
await navigate("/");
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
|
||||
@@ -89,7 +89,11 @@ export const LobbyView: FC<Props> = ({
|
||||
);
|
||||
|
||||
const navigate = useNavigate();
|
||||
const onLeaveClick = useCallback(() => navigate("/"), [navigate]);
|
||||
const onLeaveClick = useCallback(() => {
|
||||
navigate("/")?.catch((error) => {
|
||||
logger.error("Failed to navigate to /", error);
|
||||
});
|
||||
}, [navigate]);
|
||||
|
||||
const recentsButtonInFooter = useMediaQuery("(max-height: 500px)");
|
||||
const recentsButton = !confineToRoom && (
|
||||
|
||||
Reference in New Issue
Block a user