Skip to content

Commit cd3bc53

Browse files
committed
formatting
1 parent 6fdc189 commit cd3bc53

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

resources/js/hooks/use-appearance.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const applyTheme = (appearance: Appearance) => {
1111
};
1212

1313
const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');
14+
1415
const handleSystemThemeChange = () => {
1516
const currentAppearance = localStorage.getItem('appearance') as Appearance;
1617
applyTheme(currentAppearance || 'system');

resources/js/hooks/use-initials.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
export function useInitials() {
22
const getInitials = (fullName: string): string => {
33
const names = fullName.trim().split(' ');
4+
45
if (names.length === 0) return '';
56
if (names.length === 1) return names[0].charAt(0).toUpperCase();
7+
68
return `${names[0].charAt(0)}${names[names.length - 1].charAt(0)}`.toUpperCase();
79
};
810

resources/js/hooks/use-mobile.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,14 @@ export function useIsMobile() {
77

88
React.useEffect(() => {
99
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
10+
1011
const onChange = () => {
1112
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
1213
};
14+
1315
mql.addEventListener('change', onChange);
1416
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
17+
1518
return () => mql.removeEventListener('change', onChange);
1619
}, []);
1720

0 commit comments

Comments
 (0)