invalid hook call in react going from one component to an other

I have a component card.js

import React from 'react'
import Imagehelper from './helper/Imagehelper'
import ProductCompare from './ProductCompare';


const isAuthenticated = true; 

 const Card = ({
    product,
    addtoCart = true,
    removefromCart = true
 }) => {
  const productTitle = product ? product.subbranch3 :'نام محصول'  
  const productdescription = product ? product.goodproperties :'توضیحات محصول'  
  const productPrice = product ? product.price :'قیمت محصول'    
  
  const addToCart = () => {
    if (isAuthenticated){
        console.log('محصول به سبد خرید اضافه شد')
    }else{
        console.log('لطفا وارد حساب کاربری خود شوید')
    }
  }

//   const getARedirect = redirect =>{
//     if (redirect){
//         return(
//             <redirect to="/cart" />
//         )
//     }
//   }

  const showAddToCart = addtoCart =>{
    return(
        addtoCart && (
        <button
        onClick={addToCart}
        className='btn btn-outline-success mt-2 mb-2'
        >
        افزودن به سبد خرید   
        </button> 
        )
    )
  }

  const showRemoveFromCart = removefromCart =>{
    return(
        removefromCart && (
            <button
            onClick={() => {
                console.log('محصول از سبد خرید حذف شد')
            }}
            className='btn btn-outline-danger mt-2 mb-2'
            >
            حذف از سبد خرید
            </button>
        )
    )
  }

  return (
    <div className='card text-white bg-dark border border-info' dir='rtl'>
        <div className='card-header lead'>{productTitle}</div>      
        <div className='card-body'>
            <Imagehelper product={product} />
            <p className='lead bg-success font-weight-normal text-wrap'>
                {productdescription}
            </p>
            <p className='btn btn-block btn-success rounded btn-sm px-4'>{productPrice}تومان</p>
            <div className='row'>
                <div className="col-12">
                    {showAddToCart(addtoCart)}                 
                </div>
                <div className="col-12">
                    {showRemoveFromCart(removefromCart)}
                </div>
                <div className="col-12">
                    <button 
                        className='btn btn-block btn-outline-info mt-2 mb-2' 
                        onClick={ () => ProductCompare(product) }
                        >
                        compare product
                    </button>
                </div>
            </div> 
        </div>
    </div>
  )
}


export default Card

in that i make a button that when you click it it will call another component ProcuctCompare and in ProductCompare i want to compare products with each other

import React , {useState, useEffect} from 'react'
import { getProductsAttribute } from './helper/Coreapicalls';
import Imagehelper from './helper/Imagehelper';


const ProductCompare = (product) => {    
        
    console.log('product is:', product)
    const [allproductsAttribute, setAllProductsAttribute]  = useState([])
    const [singleProductAttributes, setSingleProductAttributes] = useState([])
    const [error, setError] = useState(false)
    let productID = product['id']

    const loadAllProductAttribute = () => {
        getProductsAttribute()
        .then( (data) => {
            if (data.error){
                setError(data.error)
                console.log(data.error)
            }else{
                setAllProductsAttribute(data)
            }
    })}
   
    useEffect( () =>{
        loadAllProductAttribute()
    }, )

    console.log('product attributes are:', allproductsAttribute)
    console.log(error)

    const loadSingleProductAttributes = () => {
        setSingleProductAttributes(allproductsAttribute.filter( (pa) => pa['good'] === productID )) 
    }
    
    useEffect( () => {
        loadSingleProductAttributes()
    }, []) 

 return (
    <div className='row' dir='rtl'>
        <div className="col-3 mb-3">
            <div className="row">
                <Imagehelper product={product} />
            </div>
            <div className="row">
                {singleProductAttributes.map((value, index) =>{
                    return(
                    <div key={index} className='col-4 mb-4'>
                      <p className='text-white'>{value}</p>  
                    </div>
                    )
                })}            
            </div>    
        </div>    
    </div>
  )
}


export default ProductCompare

the problem is when i clicked compare product in card.js it throws an error “Invalid hook call” i think i obeyed all react hooks roles but i can not undrestand why react shows me that error

any help would be appriciated
thanks

looked react hooks call roles and think i obeyed them

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật