"use client"; import { motion } from "framer-motion"; import { useState, useEffect } from "react"; import { useMediaQuery } from "@/util/useMediaQuery"; import { FiShoppingCart } from "react-icons/fi"; import Image from "next/image"; import CartTab from "@/components/CartTab/CartTab"; import { useSelector } from "react-redux"; import type { RootState } from "@/lib/Store"; import Products from "@/app/products/page"; import type { Product } from "@/app/redux/CartReducer"; const navMotion = { visible: { opacity: 1, transition: { when: "beforeChildren", staggerChildren: 0.15, }, }, hidden: { opacity: 0, }, }; const itemMotion = { visible: { opacity: 1, x: 0 }, hidden: { opacity: 0, x: -100 }, }; export default function Nav() { const [open, setOpen] = useState(false); const [toggled, setToggled] = useState(false); const matches = useMediaQuery("(min-width: 1280px)"); // console.log(matches); // get the products from the cart const products = useSelector((state: RootState) => state.cart.products); return ( ); }