Faro & grafana improvements

This commit is contained in:
Antoni Nuñez Romeu
2026-07-07 23:39:37 +02:00
parent 69ef048388
commit aae3ac04af
8 changed files with 213 additions and 50 deletions
@@ -0,0 +1,29 @@
import { useWindowDimensions } from 'react-native';
const TABLET_MIN_WIDTH = 768;
export function useResponsive() {
const { width, height } = useWindowDimensions();
const isTablet = width >= TABLET_MIN_WIDTH;
const isLandscape = width > height;
// Scale factor for tablet: 1.0 on phone, ~1.2 on tablet
const scale = isTablet ? 1.2 : 1.0;
// Max content width to prevent stretching on large screens
const maxContentWidth = isTablet ? Math.min(600, width * 0.6) : width;
// Horizontal padding: more on tablets to center content
const horizontalPadding = isTablet ? 48 : 24;
return {
width,
height,
isTablet,
isLandscape,
scale,
maxContentWidth,
horizontalPadding,
};
}