add prettier formatter to all file
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
'use client';
|
||||
"use client";
|
||||
|
||||
import { useState } from "react";
|
||||
import { styleDefault } from "@/mui";
|
||||
@@ -10,77 +10,69 @@ import ProgressChange from "@/app/component/ProgressChange";
|
||||
import Link from "next/link";
|
||||
|
||||
function ModalAnswer({ doctor }) {
|
||||
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 (
|
||||
<>
|
||||
<Button
|
||||
variant='outlined'
|
||||
onClick={handleOpen}
|
||||
className='!py-[6px] md:!py-2 lg:!py-[9px] !px-[16px] sm:!px-[23px] md:!px-[29px]
|
||||
lg:!px-[36px] !mr-0 md:!mr-4 !rounded !w-full md:!w-fit'
|
||||
>ثبت نظر</Button>
|
||||
<Modal
|
||||
open={open}
|
||||
onClose={handleClose}
|
||||
>
|
||||
<Box
|
||||
sx={styleDefault}
|
||||
className="!w-full !h-full md:!w-fit md:!h-fit !px-[24px] !pt-[13px] !pb-[30px] !rounded-none md:!rounded-lg"
|
||||
>
|
||||
<div
|
||||
className="w-full flex justify-end cursor-pointer"
|
||||
onClick={handleClose}
|
||||
>
|
||||
<CloseModalD />
|
||||
</div>
|
||||
<p className="text-[16px]">امتیاز شما به دکتر مهران امینی</p>
|
||||
<Rating
|
||||
className="!my-[24px]"
|
||||
sx={{
|
||||
'& .MuiSvgIcon-root': {
|
||||
width: '12px',
|
||||
height: '12px'
|
||||
}
|
||||
}}
|
||||
/>
|
||||
<ul className="flex w-full lg:w-fit flex-col items-start justify-start gap-1.5">
|
||||
{doctor.progress_detail.map((item, idx) => (
|
||||
<ProgressChange
|
||||
data={item}
|
||||
key={idx}
|
||||
/>
|
||||
))}
|
||||
</ul>
|
||||
<div className="flex flex-col gap-[16px] justify-center items-start mt-[24px]">
|
||||
<p className='text-[#495057] text-[16px] font-bold'>متن نظر</p>
|
||||
<Field
|
||||
type='number'
|
||||
multiline={true}
|
||||
title='نظر خود را بنویسید...'
|
||||
/>
|
||||
<Link
|
||||
href={`/booking/${doctor.id}`}
|
||||
className="!mr-auto"
|
||||
>
|
||||
<Button
|
||||
variant='contained'
|
||||
className='!py-2.5 !px-4 gap-1 !text-[14px] !font-medium !mt-[32px]'
|
||||
>
|
||||
دریافت نوبت
|
||||
<div className='w-[20px] h-[20px]'>
|
||||
<ArrowLeftD />
|
||||
</div>
|
||||
</Button>
|
||||
</Link>
|
||||
</div>
|
||||
</Box>
|
||||
</Modal>
|
||||
</>
|
||||
)
|
||||
return (
|
||||
<>
|
||||
<Button
|
||||
variant="outlined"
|
||||
onClick={handleOpen}
|
||||
className="!py-[6px] md:!py-2 lg:!py-[9px] !px-[16px] sm:!px-[23px] md:!px-[29px]
|
||||
lg:!px-[36px] !mr-0 md:!mr-4 !rounded !w-full md:!w-fit"
|
||||
>
|
||||
ثبت نظر
|
||||
</Button>
|
||||
<Modal open={open} onClose={handleClose}>
|
||||
<Box
|
||||
sx={styleDefault}
|
||||
className="!w-full !h-full md:!w-fit md:!h-fit !px-[24px] !pt-[13px] !pb-[30px] !rounded-none md:!rounded-lg"
|
||||
>
|
||||
<div
|
||||
className="w-full flex justify-end cursor-pointer"
|
||||
onClick={handleClose}
|
||||
>
|
||||
<CloseModalD />
|
||||
</div>
|
||||
<p className="text-[16px]">امتیاز شما به دکتر مهران امینی</p>
|
||||
<Rating
|
||||
className="!my-[24px]"
|
||||
sx={{
|
||||
"& .MuiSvgIcon-root": {
|
||||
width: "12px",
|
||||
height: "12px",
|
||||
},
|
||||
}}
|
||||
/>
|
||||
<ul className="flex w-full lg:w-fit flex-col items-start justify-start gap-1.5">
|
||||
{doctor.progress_detail.map((item, idx) => (
|
||||
<ProgressChange data={item} key={idx} />
|
||||
))}
|
||||
</ul>
|
||||
<div className="flex flex-col gap-[16px] justify-center items-start mt-[24px]">
|
||||
<p className="text-[#495057] text-[16px] font-bold">متن نظر</p>
|
||||
<Field
|
||||
type="number"
|
||||
multiline={true}
|
||||
title="نظر خود را بنویسید..."
|
||||
/>
|
||||
<Link href={`/booking/${doctor.id}`} className="!mr-auto">
|
||||
<Button
|
||||
variant="contained"
|
||||
className="!py-2.5 !px-4 gap-1 !text-[14px] !font-medium !mt-[32px]"
|
||||
>
|
||||
دریافت نوبت
|
||||
<div className="w-[20px] h-[20px]">
|
||||
<ArrowLeftD />
|
||||
</div>
|
||||
</Button>
|
||||
</Link>
|
||||
</div>
|
||||
</Box>
|
||||
</Modal>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export default ModalAnswer
|
||||
export default ModalAnswer;
|
||||
|
||||
Reference in New Issue
Block a user