🚸(frontend) auto-populate prejoin screen with user's default full name
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.
This commit is contained in:
committed by
aleb_the_flash
parent
f433f59d3f
commit
6aed4cb751
@@ -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 (
|
||||
<Screen layout="centered">
|
||||
@@ -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 }}
|
||||
/>
|
||||
</CenteredContent>
|
||||
</Screen>
|
||||
|
||||
Reference in New Issue
Block a user