add prettier formatter to all file
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
'use client';
|
||||
"use client";
|
||||
|
||||
import { useEffect, useState } from "react";
|
||||
import List from "./list";
|
||||
@@ -6,26 +6,25 @@ import SmSearch from "../searchHead/SmSearch";
|
||||
import HeadPageList from "@/app/component/head";
|
||||
|
||||
function SpecialtiesPage() {
|
||||
const [loading, setLoading] = useState(true);
|
||||
|
||||
const [loading, setLoading] = useState(true);
|
||||
useEffect(() => {
|
||||
setTimeout(() => {
|
||||
setLoading(false);
|
||||
}, 2000);
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
setTimeout(() => {
|
||||
setLoading(false);
|
||||
}, 2000);
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div className="">
|
||||
<HeadPageList
|
||||
title='تخصص مورد نظر شما چیست؟'
|
||||
detail='تخصص مورد نظرتان را جستجو کرده و یا از لیست زیر انتخاب نمایید:'
|
||||
>
|
||||
<SmSearch placeholder='جستجوی تخصص' />
|
||||
</HeadPageList>
|
||||
<List loading={loading} />
|
||||
</div>
|
||||
)
|
||||
return (
|
||||
<div className="">
|
||||
<HeadPageList
|
||||
title="تخصص مورد نظر شما چیست؟"
|
||||
detail="تخصص مورد نظرتان را جستجو کرده و یا از لیست زیر انتخاب نمایید:"
|
||||
>
|
||||
<SmSearch placeholder="جستجوی تخصص" />
|
||||
</HeadPageList>
|
||||
<List loading={loading} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default SpecialtiesPage
|
||||
export default SpecialtiesPage;
|
||||
|
||||
@@ -1,21 +1,23 @@
|
||||
import TextLoading from '@/app/component/loading/Text'
|
||||
import React from 'react'
|
||||
import TextLoading from "@/app/component/loading/Text";
|
||||
import React from "react";
|
||||
|
||||
function ItemSpecialties({ data, loading }) {
|
||||
return (
|
||||
<li
|
||||
className='py-[17.5px] px-[12px] flex flex-col justify-center items-center gap-[16px]
|
||||
className="py-[17.5px] px-[12px] flex flex-col justify-center items-center gap-[16px]
|
||||
rounded-lg bg-[#FFF] shadow-[0px_1px_24.8px_0px_rgba(204,_204,_204,_0.18)]
|
||||
hover:bg-[#5559CE] transition-all duration-500 cursor-pointer hover-mode-item-speciality'
|
||||
hover:bg-[#5559CE] transition-all duration-500 cursor-pointer hover-mode-item-speciality"
|
||||
>
|
||||
<TextLoading loading={loading} width={70} height={18}>
|
||||
<p className='text-[#3B3B3B] text-[16px] font-bold'>{data.name}</p>
|
||||
<p className="text-[#3B3B3B] text-[16px] font-bold">{data.name}</p>
|
||||
</TextLoading>
|
||||
<TextLoading loading={loading} width={50} height={18}>
|
||||
<p className='text-[#7E7E7E] text-[14px] font-medium'>{data.number_of_doctors} پزشک</p>
|
||||
<p className="text-[#7E7E7E] text-[14px] font-medium">
|
||||
{data.number_of_doctors} پزشک
|
||||
</p>
|
||||
</TextLoading>
|
||||
</li>
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
export default ItemSpecialties
|
||||
export default ItemSpecialties;
|
||||
|
||||
@@ -1,31 +1,35 @@
|
||||
import specialties from '@/data/specialties.json';
|
||||
import ItemSpecialties from './ItemSpecialties';
|
||||
import MenuS from '@/components/icons/MenuS';
|
||||
import Pagination from '@/app/component/Pagination';
|
||||
import specialties from "@/data/specialties.json";
|
||||
import ItemSpecialties from "./ItemSpecialties";
|
||||
import MenuS from "@/components/icons/MenuS";
|
||||
import Pagination from "@/app/component/Pagination";
|
||||
|
||||
function List({ loading }) {
|
||||
return (
|
||||
<div className='bg-[#FAFAFA]'>
|
||||
<div className='flex items-center justify-center gap-[12px] pt-[24px] mb-[40px]'>
|
||||
<MenuS />
|
||||
<p className='text-[#3B3B3B] text-[16px] sm:text-[19px] md:text-[22px] lg:text-[24px] font-bold'>لیست تخصص ها</p>
|
||||
</div>
|
||||
<ul className="padding-responsive grid grid-cols-2 sm:grid-cols-3 mg:grid-cols-4 lg:grid-cols-6
|
||||
return (
|
||||
<div className="bg-[#FAFAFA]">
|
||||
<div className="flex items-center justify-center gap-[12px] pt-[24px] mb-[40px]">
|
||||
<MenuS />
|
||||
<p className="text-[#3B3B3B] text-[16px] sm:text-[19px] md:text-[22px] lg:text-[24px] font-bold">
|
||||
لیست تخصص ها
|
||||
</p>
|
||||
</div>
|
||||
<ul
|
||||
className="padding-responsive grid grid-cols-2 sm:grid-cols-3 mg:grid-cols-4 lg:grid-cols-6
|
||||
gap-x-[16px] md:gap-x-[20px] lg:gap-x-[24px]
|
||||
gap-y-[16px] sm:gap-y-[24px] md:gap-y-[32px] lg:gap-y-[40px]">
|
||||
{specialties.map(speciality => (
|
||||
<ItemSpecialties
|
||||
loading={loading}
|
||||
data={speciality}
|
||||
key={speciality.id}
|
||||
/>
|
||||
))}
|
||||
</ul>
|
||||
<div className='mt-[48px] flex justify-center'>
|
||||
<Pagination />
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
gap-y-[16px] sm:gap-y-[24px] md:gap-y-[32px] lg:gap-y-[40px]"
|
||||
>
|
||||
{specialties.map((speciality) => (
|
||||
<ItemSpecialties
|
||||
loading={loading}
|
||||
data={speciality}
|
||||
key={speciality.id}
|
||||
/>
|
||||
))}
|
||||
</ul>
|
||||
<div className="mt-[48px] flex justify-center">
|
||||
<Pagination />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default List;
|
||||
export default List;
|
||||
|
||||
Reference in New Issue
Block a user