diff --git a/components/ProductList.tsx b/components/ProductList.tsx index 2803a72..a73936b 100644 --- a/components/ProductList.tsx +++ b/components/ProductList.tsx @@ -14,8 +14,8 @@ const Alert = React.forwardRef(function Alert( return ; }); -const ProductList: React.FC = () => { - const { products, updateProduct, removeProduct } = useProducts(); +const ProductList: React.FC<{ products: Product[] }> = ({ products }) => { + const { updateProduct, removeProduct } = useProducts(); const { user } = useAuth(); const router = useRouter(); const [successOpen, setSuccessOpen] = useState(false); @@ -72,4 +72,4 @@ const ProductList: React.FC = () => { ); }; -export default ProductList; \ No newline at end of file +export default ProductList;