From 594bd5a692304576caeb273294dbbecc7b5ad05d Mon Sep 17 00:00:00 2001 From: lebaudantoine Date: Tue, 13 Jan 2026 15:23:05 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=B8(frontend)=20hide=20back=20button?= =?UTF-8?q?=20when=20a=20user=20is=20ejected=20by=20an=20admin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Avoid showing a back button when a user is kicked out of a meeting by an admin, to prevent them from repeatedly rejoining the room. --- .../src/features/rooms/routes/Feedback.tsx | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/frontend/src/features/rooms/routes/Feedback.tsx b/src/frontend/src/features/rooms/routes/Feedback.tsx index b96bfe5c..fdcbb307 100644 --- a/src/frontend/src/features/rooms/routes/Feedback.tsx +++ b/src/frontend/src/features/rooms/routes/Feedback.tsx @@ -22,6 +22,11 @@ const Heading = styled('h1', { }, }) +enum DisconnectReasonKey { + DuplicateIdentity = 'duplicateIdentity', + ParticipantRemoved = 'participantRemoved', +} + export const FeedbackRoute = () => { const { t } = useTranslation('rooms') const [, setLocation] = useLocation() @@ -32,21 +37,25 @@ export const FeedbackRoute = () => { if (!state?.reason) return switch (state.reason) { case DisconnectReason.DUPLICATE_IDENTITY: - return 'duplicateIdentity' + return DisconnectReasonKey.DuplicateIdentity case DisconnectReason.PARTICIPANT_REMOVED: - return 'participantRemoved' + return DisconnectReasonKey.ParticipantRemoved } }, []) + const showBackButton = reasonKey !== DisconnectReasonKey.ParticipantRemoved + return (
{t(`feedback.heading.${reasonKey || 'normal'}`)} - + {showBackButton && ( + + )}