mirror of
https://github.com/DocNR/POWR.git
synced 2025-04-23 01:01:27 +00:00
15 lines
399 B
TypeScript
15 lines
399 B
TypeScript
// hooks/useFabPosition.ts
|
|
import { useMemo } from 'react';
|
|
import { Platform } from 'react-native';
|
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
|
|
export function useFabPosition() {
|
|
const insets = useSafeAreaInsets();
|
|
|
|
return useMemo(() => ({
|
|
bottom: Platform.select({
|
|
ios: Math.max(20, insets.bottom) + 65,
|
|
android: 20,
|
|
}),
|
|
}), [insets.bottom]);
|
|
} |