Update icons with pointerEvents="none" and upgrade lucide-react-native to v0.563.0

This commit is contained in:
2026-02-17 10:22:18 +01:00
parent cded5e8f00
commit 68e25fac71
27 changed files with 106 additions and 128 deletions

View File

@@ -2,12 +2,12 @@ import { Redirect, Tabs } from 'expo-router';
import { Home, Clock, Zap, CalendarIcon, Building } from 'lucide-react-native';
import { useContext } from 'react';
import { AuthContext } from '@/utils/authContext';
import { useSafeAreaInsets } from 'react-native-safe-area-context';
import {useSafeAreaInsets} from "react-native-safe-area-context";
export default function ProtectedLayout() {
const authState = useContext(AuthContext);
const insets = useSafeAreaInsets();
if (!authState.isReady) {
return null;
}
@@ -24,7 +24,7 @@ export default function ProtectedLayout() {
backgroundColor: '#ffffff',
borderTopWidth: 1,
borderTopColor: '#f3f4f6',
height: 90,
height: 70 + insets.bottom,
paddingBottom: insets.bottom,
paddingTop: 10,
paddingHorizontal: 10,
@@ -43,28 +43,28 @@ export default function ProtectedLayout() {
name="index"
options={{
title: 'Home',
tabBarIcon: ({ color, size }) => <Home color={color} size={24} />,
tabBarIcon: ({ color, size }) => <Home pointerEvents="none" color={color} size={24} />,
}}
/>
<Tabs.Screen
name="attendance/index"
options={{
title: 'Presenze',
tabBarIcon: ({ color, size }) => <Clock color={color} size={24} />,
tabBarIcon: ({ color, size }) => <Clock pointerEvents="none" color={color} size={24} />,
}}
/>
<Tabs.Screen
name="permits/index"
options={{
title: 'Permessi',
tabBarIcon: ({ color, size }) => <CalendarIcon color={color} size={24} />,
tabBarIcon: ({ color, size }) => <CalendarIcon pointerEvents="none" color={color} size={24} />,
}}
/>
<Tabs.Screen
name="sites"
options={{
title: 'Cantieri',
tabBarIcon: ({ color, size }) => <Building color={color} size={24} />,
tabBarIcon: ({ color, size }) => <Building pointerEvents="none" color={color} size={24} />,
}}
/>
{/* // TODO: Probably needs to be restricted to admin */}
@@ -72,7 +72,7 @@ export default function ProtectedLayout() {
name="automation"
options={{
title: 'Domotica',
tabBarIcon: ({ color, size }) => <Zap color={color} size={24} />,
tabBarIcon: ({ color, size }) => <Zap pointerEvents="none" color={color} size={24} />,
}}
/>
{/* TODO: Should be removed - move tabs inside (tabs) and refactor _layout */}
@@ -85,4 +85,4 @@ export default function ProtectedLayout() {
/>
</Tabs>
);
}
}