add prettier formatter to all file

This commit is contained in:
Ehsan
2024-09-25 11:03:44 +03:30
parent fa38ee2b21
commit eda896e917
410 changed files with 47636 additions and 43842 deletions
@@ -1,67 +1,73 @@
import CalndarD from "@/components/icons/CalndarD"
import { Rating } from "@mui/material"
import Image from "next/image"
import ModalDeleteComment from "./modal"
import CircularLoading from "@/app/component/loading/Circular"
import TextLoading from "@/app/component/loading/Text"
import CustomLoading from "@/app/component/loading/Custom"
import MultilineLoading from "@/app/component/loading/Multiline"
import CalndarD from "@/components/icons/CalndarD";
import { Rating } from "@mui/material";
import Image from "next/image";
import ModalDeleteComment from "./modal";
import CircularLoading from "@/app/component/loading/Circular";
import TextLoading from "@/app/component/loading/Text";
import CustomLoading from "@/app/component/loading/Custom";
import MultilineLoading from "@/app/component/loading/Multiline";
function Comment({ data, loading, idx, length }) {
return (
<li className="flex flex-col gap-[8px] w-full">
<div className="flex items-start justify-between w-full">
<div className="flex items-center justify-start gap-[8px] md:gap-[12px] lg:gap-[16px]">
<CircularLoading loading={loading} width={87} height={87}>
<Image
className="w-[48px] sm:w-[61px] md:w-[75px] lg:w-[88px] h-[48px] sm:h-[61px] md:h-[75px] lg:h-[88px]"
src={data.profile}
alt="profile"
height={87}
width={87}
/>
</CircularLoading>
<div className="flex flex-col items-start justify-center gap-[8px] md:gap-[12px] lg:gap-[16px]">
<TextLoading loading={loading} width={105} height={18}>
<p className="text-[#3B3B3B] text-[12px] md:text-[14px] lg:text-[16px] font-bold">{data.name_doctor}</p>
</TextLoading>
<TextLoading loading={loading} width={65} height={18}>
<p className="text-[#525252] text-[12px] md:text-[14px] font-medium">تخصص: {data.expertise}</p>
</TextLoading>
</div>
</div>
<CustomLoading loading={loading} width={90} height={30}>
<ModalDeleteComment />
</CustomLoading>
</div>
<CustomLoading loading={loading} width={130} height={18}>
<Rating
defaultValue={data.stars.value}
className="!mt-[4px] md:!mt-[6px] lg:!mt-[8px]"
sx={{
'& .MuiSvgIcon-root': {
width: '16px',
height: '16px'
}
}}
/>
</CustomLoading>
<MultilineLoading loading={loading} width='full' height={18} line={2}>
<p className="text-[#525252] mt-[4px] md:mt-[2px] lg:mt-0 text-[14px] font-normal leading-[28px] md:leading-[30px] lg:leading-[33px]">{data.comment}</p>
</MultilineLoading>
<div className="flex items-center justify-start gap-[8px]">
<div className="w-[20px] h-[20px] sm:w-[22px] sm:h-[22px] lg:w-[24px] lg:h-[24px]">
<CalndarD />
</div>
<TextLoading width={90} height={18} loading={loading}>
<p className="text-[#7E7E7E] text-[12px] font-normal">{data.date}</p>
</TextLoading>
</div>
{length > idx + 1 && (
<span className="w-full block h-px bg-[#EFEFEF] mt-0 md:mt-[4px] lg:mt-[8px]"></span>
)}
</li>
)
return (
<li className="flex flex-col gap-[8px] w-full">
<div className="flex items-start justify-between w-full">
<div className="flex items-center justify-start gap-[8px] md:gap-[12px] lg:gap-[16px]">
<CircularLoading loading={loading} width={87} height={87}>
<Image
className="w-[48px] sm:w-[61px] md:w-[75px] lg:w-[88px] h-[48px] sm:h-[61px] md:h-[75px] lg:h-[88px]"
src={data.profile}
alt="profile"
height={87}
width={87}
/>
</CircularLoading>
<div className="flex flex-col items-start justify-center gap-[8px] md:gap-[12px] lg:gap-[16px]">
<TextLoading loading={loading} width={105} height={18}>
<p className="text-[#3B3B3B] text-[12px] md:text-[14px] lg:text-[16px] font-bold">
{data.name_doctor}
</p>
</TextLoading>
<TextLoading loading={loading} width={65} height={18}>
<p className="text-[#525252] text-[12px] md:text-[14px] font-medium">
تخصص: {data.expertise}
</p>
</TextLoading>
</div>
</div>
<CustomLoading loading={loading} width={90} height={30}>
<ModalDeleteComment />
</CustomLoading>
</div>
<CustomLoading loading={loading} width={130} height={18}>
<Rating
defaultValue={data.stars.value}
className="!mt-[4px] md:!mt-[6px] lg:!mt-[8px]"
sx={{
"& .MuiSvgIcon-root": {
width: "16px",
height: "16px",
},
}}
/>
</CustomLoading>
<MultilineLoading loading={loading} width="full" height={18} line={2}>
<p className="text-[#525252] mt-[4px] md:mt-[2px] lg:mt-0 text-[14px] font-normal leading-[28px] md:leading-[30px] lg:leading-[33px]">
{data.comment}
</p>
</MultilineLoading>
<div className="flex items-center justify-start gap-[8px]">
<div className="w-[20px] h-[20px] sm:w-[22px] sm:h-[22px] lg:w-[24px] lg:h-[24px]">
<CalndarD />
</div>
<TextLoading width={90} height={18} loading={loading}>
<p className="text-[#7E7E7E] text-[12px] font-normal">{data.date}</p>
</TextLoading>
</div>
{length > idx + 1 && (
<span className="w-full block h-px bg-[#EFEFEF] mt-0 md:mt-[4px] lg:mt-[8px]"></span>
)}
</li>
);
}
export default Comment
export default Comment;
@@ -1,19 +1,19 @@
import Comment from "./Comment"
import Comment from "./Comment";
function Comments({ user, loading }) {
return (
<ul className="flex opacity-page flex-col items-start justify-start gap-[24px] md:gap-[22px] lg:gap-[20px]">
{user.comments.map((item, idx) => (
<Comment
key={idx}
idx={idx}
data={item}
loading={loading}
length={user.comments.length}
/>
))}
</ul>
)
return (
<ul className="flex opacity-page flex-col items-start justify-start gap-[24px] md:gap-[22px] lg:gap-[20px]">
{user.comments.map((item, idx) => (
<Comment
key={idx}
idx={idx}
data={item}
loading={loading}
length={user.comments.length}
/>
))}
</ul>
);
}
export default Comments
export default Comments;
@@ -1,67 +1,63 @@
import { useState } from 'react';
import TrashOrangeD from '@/components/icons/TrashOrangeD';
import { Box, Button, Modal } from '@mui/material';
import { styleDefault } from '@/mui';
import CloseModalD from '@/components/icons/CloseModalD';
import { useState } from "react";
import TrashOrangeD from "@/components/icons/TrashOrangeD";
import { Box, Button, Modal } from "@mui/material";
import { styleDefault } from "@/mui";
import CloseModalD from "@/components/icons/CloseModalD";
function ModalDeleteComment() {
const [open, setOpen] = useState(false);
const handleOpen = () => setOpen(true);
const handleClose = () => setOpen(false);
const [open, setOpen] = useState(false);
const handleOpen = () => setOpen(true);
const handleClose = () => setOpen(false);
return (
<div>
{/* Button Modal */}
<Button
className="!gap-[5px] !p-1 !text-[#F17732] !text-[12px] md:!text-[14px] !font-medium"
onClick={handleOpen}
variant="text"
>
<TrashOrangeD />
حذف نظر
return (
<div>
{/* Button Modal */}
<Button
className="!gap-[5px] !p-1 !text-[#F17732] !text-[12px] md:!text-[14px] !font-medium"
onClick={handleOpen}
variant="text"
>
<TrashOrangeD />
حذف نظر
</Button>
{/* Content Modal */}
<Modal open={open} onClose={handleClose}>
<Box
sx={styleDefault}
className="!w-fit !min-w-[328px] md:!w-fit md:!min-w-[552px] !py-[20px] !px-[24px]"
>
<div className="flex items-center justify-between w-full">
<p className="text-[#3B3B3B] text-[14px] sm:text-[16px] md:text-[18px] lg:text-[20px] font-medium">
حذف نظر
</p>
<Button onClick={handleClose} className="!p-1" variant="text">
<CloseModalD />
</Button>
{/* Content Modal */}
<Modal
open={open}
onClose={handleClose}
</div>
<span className="block h-px w-full bg-[#EFEFEF] my-[12px] md:my-[14px] lg:my-[16px]"></span>
<p className="text-[#525252] text-[12px] md:text-[14px] lg:text-[16px] font-normal">
آیا این نظر حذف شود؟
</p>
<div className="flex items-center justify-end gap-[16px] mt-[12px]">
<Button
variant="outlined"
onClick={handleClose}
className="!py-[4px] md:!py-[6px] lg:!py-[8px] !px-[8px] md:!px-[12px] lg:!px-[16px] !rounded-[4px] !border-[#828DE0] !text-[#828DE0] !text-[16px] !font-medium"
>
<Box
sx={styleDefault}
className="!w-fit !min-w-[328px] md:!w-fit md:!min-w-[552px] !py-[20px] !px-[24px]"
>
<div className='flex items-center justify-between w-full'>
<p className='text-[#3B3B3B] text-[14px] sm:text-[16px] md:text-[18px] lg:text-[20px] font-medium'>حذف نظر</p>
<Button
onClick={handleClose}
className='!p-1'
variant='text'
>
<CloseModalD />
</Button>
</div>
<span className='block h-px w-full bg-[#EFEFEF] my-[12px] md:my-[14px] lg:my-[16px]'></span>
<p className='text-[#525252] text-[12px] md:text-[14px] lg:text-[16px] font-normal'>آیا این نظر حذف شود؟</p>
<div className='flex items-center justify-end gap-[16px] mt-[12px]'>
<Button
variant='outlined'
onClick={handleClose}
className='!py-[4px] md:!py-[6px] lg:!py-[8px] !px-[8px] md:!px-[12px] lg:!px-[16px] !rounded-[4px] !border-[#828DE0] !text-[#828DE0] !text-[16px] !font-medium'
>
انصراف
</Button>
<Button
variant='contained'
onClick={handleClose}
className='!py-[4px] md:!py-[6px] lg:!py-[8px] !px-[8px] md:!px-[12px] lg:!px-[16px] !rounded-[4px] !text-[#EFEFEF] !text-[16px] !font-medium'
>
حذف نظر
</Button>
</div>
</Box>
</Modal>
</div>
)
انصراف
</Button>
<Button
variant="contained"
onClick={handleClose}
className="!py-[4px] md:!py-[6px] lg:!py-[8px] !px-[8px] md:!px-[12px] lg:!px-[16px] !rounded-[4px] !text-[#EFEFEF] !text-[16px] !font-medium"
>
حذف نظر
</Button>
</div>
</Box>
</Modal>
</div>
);
}
export default ModalDeleteComment
export default ModalDeleteComment;