@@ -4,15 +4,17 @@ import type { ReactNode } from 'react';
44import { getSecondFactors } from '@/ui/utils/mfa' ;
55
66import { useEnvironment , useUserProfileContext } from '../../contexts' ;
7+ import { DeleteSection } from './DeleteSection' ;
78import { MfaSection } from './MfaSection' ;
89import { PasskeySection } from './PasskeySection' ;
910import { PasswordSection } from './PasswordSection' ;
10- import { DeleteSection } from './DeleteSection' ;
1111
1212export function SecurityPassword ( ) : ReactNode {
1313 const { instanceIsPasswordBased } = useEnvironment ( ) . userSettings ;
1414
15- if ( ! instanceIsPasswordBased ) return null ;
15+ if ( ! instanceIsPasswordBased ) {
16+ return null ;
17+ }
1618
1719 return < PasswordSection /> ;
1820}
@@ -21,23 +23,29 @@ export function SecurityPasskeys(): ReactNode {
2123 const { attributes } = useEnvironment ( ) . userSettings ;
2224 const { shouldAllowIdentificationCreation } = useUserProfileContext ( ) ;
2325
24- if ( ! attributes . passkey ?. enabled || ! shouldAllowIdentificationCreation ) return null ;
26+ if ( ! attributes . passkey ?. enabled || ! shouldAllowIdentificationCreation ) {
27+ return null ;
28+ }
2529
2630 return < PasskeySection /> ;
2731}
2832
2933export function SecurityMfa ( ) : ReactNode {
3034 const { attributes } = useEnvironment ( ) . userSettings ;
3135
32- if ( getSecondFactors ( attributes ) . length === 0 ) return null ;
36+ if ( getSecondFactors ( attributes ) . length === 0 ) {
37+ return null ;
38+ }
3339
3440 return < MfaSection /> ;
3541}
3642
3743export function SecurityDelete ( ) : ReactNode {
3844 const { user } = useUser ( ) ;
3945
40- if ( ! user ?. deleteSelfEnabled ) return null ;
46+ if ( ! user ?. deleteSelfEnabled ) {
47+ return null ;
48+ }
4149
4250 return < DeleteSection /> ;
4351}
0 commit comments