From 6aed4cb751fed026b79da1002237b48e13490d37 Mon Sep 17 00:00:00 2001 From: lebaudantoine Date: Fri, 15 Nov 2024 23:54:39 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=B8(frontend)=20auto-populate=20prejoi?= =?UTF-8?q?n=20screen=20with=20user's=20default=20full=20name?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Streamline user joining a room by pre-fillig name field from their ProConnect data. Reduces friction and typos in the join flow. This feature will be mostly used by new users. Recurrent users have their previous choices persisted in local storage. --- src/frontend/src/features/rooms/components/Join.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/frontend/src/features/rooms/components/Join.tsx b/src/frontend/src/features/rooms/components/Join.tsx index d4711b64..310ac8d6 100644 --- a/src/frontend/src/features/rooms/components/Join.tsx +++ b/src/frontend/src/features/rooms/components/Join.tsx @@ -2,6 +2,7 @@ import { useTranslation } from 'react-i18next' import { PreJoin, type LocalUserChoices } from '@livekit/components-react' import { Screen } from '@/layout/Screen' import { CenteredContent } from '@/layout/CenteredContent' +import { useUser } from '@/features/auth' export const Join = ({ onSubmit, @@ -9,6 +10,7 @@ export const Join = ({ onSubmit: (choices: LocalUserChoices) => void }) => { const { t } = useTranslation('rooms') + const { user } = useUser() return ( @@ -20,6 +22,7 @@ export const Join = ({ camLabel={t('join.videoinput.label')} joinLabel={t('join.joinLabel')} userLabel={t('join.usernameLabel')} + defaults={{ username: user?.full_name }} />