Skip to content

Commit c7d21f5

Browse files
authored
Inline return. (#94)
1 parent 694facb commit c7d21f5

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

Diff for: resources/js/hooks/use-initials.tsx

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { useCallback } from 'react';
22

33
export function useInitials() {
4-
const getInitials = useCallback((fullName: string): string => {
4+
return useCallback((fullName: string): string => {
55
const names = fullName.trim().split(' ');
66

77
if (names.length === 0) return '';
@@ -12,6 +12,4 @@ export function useInitials() {
1212

1313
return `${firstInitial}${lastInitial}`.toUpperCase();
1414
}, []);
15-
16-
return getInitials;
1715
}

Diff for: resources/js/hooks/use-mobile-navigation.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
import { useCallback } from 'react';
22

33
export function useMobileNavigation() {
4-
const cleanup = useCallback(() => {
4+
return useCallback(() => {
55
// Remove pointer-events style from body...
66
document.body.style.removeProperty('pointer-events');
77
}, []);
8-
9-
return cleanup;
108
}

0 commit comments

Comments
 (0)