Home

import { Tabs } from “expo-router”;
import { Home, LayoutGrid, ShoppingCart } from “lucide-react-native”;
import React from “react”;
import { View, Text, StyleSheet } from “react-native”;

import Colors from “@/constants/colors”;
import { useCart } from “@/contexts/cart”;

function CartBadge() {
const { totalItems } = useCart();

if (totalItems === 0) return null;

return (
{totalItems}
);
}

export default function TabLayout() {
return (
, }} /> , }} /> ( ), }} />
);
}

const styles = StyleSheet.create({
badge: {
position: “absolute”,
right: -10,
top: -5,
backgroundColor: Colors.light.discount,
borderRadius: 10,
minWidth: 18,
height: 18,
justifyContent: “center”,
alignItems: “center”,
paddingHorizontal: 4,
},
badgeText: {
color: “#fff”,
fontSize: 11,
fontWeight: “700”,
},
});