@@ -27,7 +27,7 @@ import {
2727} from '@rocket.chat/ui-contexts' ;
2828import { useMutation } from '@tanstack/react-query' ;
2929import type { AllHTMLAttributes , ChangeEvent } from 'react' ;
30- import { useCallback , useEffect , useId , useMemo } from 'react' ;
30+ import { useCallback , useEffect , useMemo } from 'react' ;
3131import { Controller , useFormContext } from 'react-hook-form' ;
3232
3333import type { AccountProfileFormValues } from './getProfileInitialValues' ;
@@ -48,7 +48,6 @@ const AccountProfileForm = (props: AllHTMLAttributes<HTMLFormElement>) => {
4848
4949 const setPreferences = useEndpoint ( 'POST' , '/v1/users.setPreferences' ) ;
5050 const statusVisibilityEnabled = useSetting ( 'Accounts_StatusVisibility_Enabled' , false ) ;
51- const statusVisibilityDeniedId = useId ( ) ;
5251 const checkUsernameAvailability = useEndpoint ( 'GET' , '/v1/users.checkUsernameAvailability' ) ;
5352 const sendConfirmationEmail = useEndpoint ( 'POST' , '/v1/users.sendConfirmationEmail' ) ;
5453
@@ -291,14 +290,12 @@ const AccountProfileForm = (props: AllHTMLAttributes<HTMLFormElement>) => {
291290 </ Field >
292291 { statusVisibilityEnabled && (
293292 < Field >
294- < FieldLabel htmlFor = { statusVisibilityDeniedId } > { t ( 'Accounts_StatusVisibility_Denied_Own' ) } </ FieldLabel >
293+ < FieldLabel > { t ( 'Accounts_StatusVisibility_Denied_Own' ) } </ FieldLabel >
295294 < FieldRow >
296295 < Controller
297296 control = { control }
298297 name = 'statusVisibilityDenied'
299- render = { ( { field : { onChange, value } } ) => (
300- < UserAutoCompleteMultiple id = { statusVisibilityDeniedId } value = { value } onChange = { onChange } />
301- ) }
298+ render = { ( { field : { onChange, value } } ) => < UserAutoCompleteMultiple value = { value } onChange = { onChange } /> }
302299 />
303300 </ FieldRow >
304301 < FieldHint > { t ( 'Accounts_StatusVisibility_Denied_Own_Description' ) } </ FieldHint >
0 commit comments