landing + single company + auth
This commit is contained in:
@@ -1,22 +1,29 @@
|
||||
import { Calendar, CallCalling, Location, Map1, MessageMinus, Profile, Setting2, Sms } from 'iconsax-react'
|
||||
import { FC } from 'react'
|
||||
|
||||
import { useParams } from 'react-router-dom'
|
||||
import { useGetCompanyDetail } from '../home/hooks/useHomeData'
|
||||
import moment from 'moment-jalaali'
|
||||
import Products from './components/Products'
|
||||
const CompanyDetail: FC = () => {
|
||||
|
||||
const { id } = useParams()
|
||||
const { data } = useGetCompanyDetail(id || '')
|
||||
|
||||
return (
|
||||
<div className='mt-4 pb-20'>
|
||||
<img
|
||||
src='https://picsum.photos/200/300'
|
||||
src={data?.data?.company?.coverImageUrl}
|
||||
className='w-full h-[220px] rounded-xl'
|
||||
/>
|
||||
<div className='p-6 bg-white rounded-xl -mt-4 relative'>
|
||||
<div className='flex gap-3'>
|
||||
<img
|
||||
src='https://picsum.photos/200/300'
|
||||
src={data?.data?.company?.profileImageUrl}
|
||||
className='size-16 rounded-xl object-cover'
|
||||
/>
|
||||
<div className='flex-1 items-center flex justify-between '>
|
||||
<div className='text-sm'>
|
||||
شرکت شماره ۱
|
||||
{data?.data?.company?.name}
|
||||
</div>
|
||||
<div className='flex items-center gap-1.5 text-xs'>
|
||||
<Map1
|
||||
@@ -38,7 +45,7 @@ const CompanyDetail: FC = () => {
|
||||
color='black'
|
||||
/>
|
||||
<div>
|
||||
مدیرعامل: مهرداد مظفری
|
||||
مدیرعامل: {data?.data?.company?.user?.fullName}
|
||||
</div>
|
||||
</div>
|
||||
<div className='flex gap-1 items-center'>
|
||||
@@ -47,7 +54,7 @@ const CompanyDetail: FC = () => {
|
||||
color='black'
|
||||
/>
|
||||
<div>
|
||||
صنعت : نفت و گاز
|
||||
صنعت : {data?.data?.company?.industry?.title}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -58,7 +65,7 @@ const CompanyDetail: FC = () => {
|
||||
color='black'
|
||||
/>
|
||||
<div>
|
||||
شماره تماس : ۰۸۶۳۲۳۴۵۶۷۸
|
||||
شماره تماس : {data?.data?.company?.user?.phone}
|
||||
</div>
|
||||
</div>
|
||||
<div className='flex gap-1 items-center'>
|
||||
@@ -67,7 +74,7 @@ const CompanyDetail: FC = () => {
|
||||
color='black'
|
||||
/>
|
||||
<div>
|
||||
شناسه ملی : ۱۲۳۴
|
||||
شناسه ملی : {data?.data?.company?.identificationNumber}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -78,7 +85,7 @@ const CompanyDetail: FC = () => {
|
||||
color='black'
|
||||
/>
|
||||
<div>
|
||||
ایمیل : info@example.com
|
||||
ایمیل : {data?.data?.company?.user?.email}
|
||||
</div>
|
||||
</div>
|
||||
<div className='flex gap-1 items-center'>
|
||||
@@ -87,7 +94,7 @@ const CompanyDetail: FC = () => {
|
||||
color='black'
|
||||
/>
|
||||
<div>
|
||||
تاریخ تاسیس : ۱۳۸۹
|
||||
تاریخ تاسیس : {moment(data?.data?.company?.dateOfEstablishment, 'jYYYY/jMM/jDD').format('jYYYY/jMM/jDD')}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -98,50 +105,13 @@ const CompanyDetail: FC = () => {
|
||||
color='black'
|
||||
/>
|
||||
<div>
|
||||
آدرس : لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ
|
||||
آدرس : {data?.data?.company?.address}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className='mt-6 flex justify-center gap-2 items-center'>
|
||||
<div className='flex h-8 bg-white px-6 items-center rounded-full text-xs border-2 border-white pt-[1px]'>
|
||||
محصولات
|
||||
</div>
|
||||
<div className='flex h-8 bg-white px-6 items-center rounded-full text-xs border-2 border-white bg-opacity-45 pt-[1px]'>
|
||||
خدمات
|
||||
</div>
|
||||
<div className='flex h-8 bg-white px-6 items-center rounded-full text-xs border-2 border-white bg-opacity-45 pt-[1px]'>
|
||||
گالری
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className='flex gap-2 flex-wrap mt-6'>
|
||||
<div className='flex-1 gap-2.5 bg-white min-w-[28%] h-20 flex items-center p-2 rounded-xl'>
|
||||
<div className='size-12 rounded-xl bg-red-100'></div>
|
||||
<div className='text-xs'>
|
||||
<div>
|
||||
شیر صنعتی
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className='flex-1 gap-2.5 bg-white min-w-[28%] h-20 flex items-center p-2 rounded-xl'>
|
||||
<div className='size-12 rounded-xl bg-red-100'></div>
|
||||
<div className='text-xs'>
|
||||
<div>
|
||||
شیر صنعتی
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className='flex-1 gap-2.5 bg-white min-w-[28%] h-20 flex items-center p-2 rounded-xl'>
|
||||
<div className='size-12 rounded-xl bg-red-100'></div>
|
||||
<div className='text-xs'>
|
||||
<div>
|
||||
شیر صنعتی
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<Products />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user