diff --git a/src/frontend/src/features/rooms/components/Conference.tsx b/src/frontend/src/features/rooms/components/Conference.tsx index e96c4e46..3ee174c7 100644 --- a/src/frontend/src/features/rooms/components/Conference.tsx +++ b/src/frontend/src/features/rooms/components/Conference.tsx @@ -127,7 +127,9 @@ export const Conference = ({ })} onDisconnected={(e) => { if (e == DisconnectReason.CLIENT_INITIATED) { - navigateTo('feedback') + navigateTo('feedback', { duplicateIdentity: false }) + } else if (e == DisconnectReason.DUPLICATE_IDENTITY) { + navigateTo('feedback', { duplicateIdentity: true }) } }} > diff --git a/src/frontend/src/features/rooms/routes/Feedback.tsx b/src/frontend/src/features/rooms/routes/Feedback.tsx index 9cef5184..f23c2f15 100644 --- a/src/frontend/src/features/rooms/routes/Feedback.tsx +++ b/src/frontend/src/features/rooms/routes/Feedback.tsx @@ -3,7 +3,7 @@ import { Button } from '@/primitives' import { Screen } from '@/layout/Screen' import { Center, HStack, styled, VStack } from '@/styled-system/jsx' import { Rating } from '@/features/rooms/components/Rating.tsx' -import { useLocation } from 'wouter' +import { useLocation, useSearchParams } from 'wouter' // fixme - duplicated with home, refactor in a proper style const Heading = styled('h1', { @@ -16,17 +16,25 @@ const Heading = styled('h1', { lineHeight: '2.5rem', letterSpacing: '0', paddingBottom: '2rem', + textAlign: 'center', }, }) export const FeedbackRoute = () => { const { t } = useTranslation('rooms') const [, setLocation] = useLocation() + + const [searchParams] = useSearchParams() + return (
- {t('feedback.heading')} + + {t( + `feedback.heading.${searchParams.get('duplicateIdentity') ? 'duplicateIdentity' : 'normal'}` + )} +