File tree 2 files changed +2
-6
lines changed
2 files changed +2
-6
lines changed Original file line number Diff line number Diff line change 1
1
import { useCallback } from 'react' ;
2
2
3
3
export function useInitials ( ) {
4
- const getInitials = useCallback ( ( fullName : string ) : string => {
4
+ return useCallback ( ( fullName : string ) : string => {
5
5
const names = fullName . trim ( ) . split ( ' ' ) ;
6
6
7
7
if ( names . length === 0 ) return '' ;
@@ -12,6 +12,4 @@ export function useInitials() {
12
12
13
13
return `${ firstInitial } ${ lastInitial } ` . toUpperCase ( ) ;
14
14
} , [ ] ) ;
15
-
16
- return getInitials ;
17
15
}
Original file line number Diff line number Diff line change 1
1
import { useCallback } from 'react' ;
2
2
3
3
export function useMobileNavigation ( ) {
4
- const cleanup = useCallback ( ( ) => {
4
+ return useCallback ( ( ) => {
5
5
// Remove pointer-events style from body...
6
6
document . body . style . removeProperty ( 'pointer-events' ) ;
7
7
} , [ ] ) ;
8
-
9
- return cleanup ;
10
8
}
You can’t perform that action at this time.
0 commit comments