import React from 'react'
import DocumentCard from '../../Components/Document/DocumentCard'
import HeaderLink from '../../Components/Ui/HeaderLink'
import { useGetCertificate } from '../../api/certificate'
import Spinner from '../../Components/Utils/Loading/Spinner'

const Document = () => {
  const {data , isLoading} = useGetCertificate();
  return (
    <div className='Document_page'>
      <HeaderLink text='Quality Certificates'/>
        {
        isLoading ? <Spinner/> :
        data?.data?.map((e:any)=>(
            <DocumentCard
                image={e.image}
                text={e.text}
                name={e.name}
            />
        ))}
    </div>
  )
}

export default Document