From eda896e91718e1f6db86e3ceb3cb3524f85eced3 Mon Sep 17 00:00:00 2001 From: Ehsan Date: Wed, 25 Sep 2024 11:03:44 +0330 Subject: [PATCH] add prettier formatter to all file --- app/about-us/page.js | 16 +- app/blog/[slug]/page.js | 24 +- app/blogs/page.js | 16 +- app/booking/[slug]/page.js | 119 +- app/clinic/[slug]/page.js | 26 +- app/clinics/page.js | 16 +- app/component/AnimationTextHead.js | 29 +- app/component/CustomTable.js | 73 +- app/component/EditField.js | 112 +- app/component/Field.js | 54 +- app/component/FieldIcon.js | 76 +- app/component/ItemDoctor.js | 145 +- app/component/Logo.js | 38 +- app/component/Pageguide.js | 45 +- app/component/Pagination.js | 45 +- app/component/ProfressDetail.js | 44 +- app/component/ProgressChange.js | 71 +- app/component/Tabs.js | 72 +- app/component/ThemeRegistry.js | 114 +- app/component/TimePickerField.js | 135 +- app/component/comment/Field.js | 50 +- app/component/comment/ItemUser.js | 316 +- app/component/comment/index.js | 49 +- app/component/date/datePicker/ButtonDate.js | 24 +- app/component/date/datePicker/Field.js | 62 +- app/component/date/datePicker/index.js | 167 +- app/component/date/dateTime/Hours.js | 48 +- app/component/date/dateTime/index.js | 39 +- app/component/element/AutoCompleteSelect.js | 112 +- app/component/element/Field.js | 63 +- app/component/head/index.js | 28 +- app/component/loading/Circular.js | 16 +- app/component/loading/Custom.js | 22 +- app/component/loading/Multiline.js | 18 +- app/component/loading/Text.js | 22 +- app/component/openLocation/Content.js | 72 +- app/component/openLocation/index.js | 79 +- app/contact-us/page.js | 16 +- app/dashboard/not-found.js | 10 +- app/dashboard/page.js | 57 +- app/doctor/[slug]/page.js | 17 +- app/doctors/page.js | 10 +- app/globals.css | 397 +- app/layout.js | 14 +- app/login-verify/page.js | 37 +- app/login/page.js | 39 +- app/not-found.js | 10 +- app/page.js | 2 +- app/panel/(layout)/add-doctor/page.js | 8 +- app/panel/(layout)/dashboard/page.js | 10 +- app/panel/(layout)/layout.js | 94 +- app/panel/(layout)/turns/page.js | 10 +- app/panel/(layout)/user-account/page.js | 10 +- app/specialties/page.js | 16 +- app/theme/theme.js | 64 +- components/aboutUs/Head.js | 30 +- components/aboutUs/Services.js | 65 +- components/aboutUs/index.js | 35 +- components/blog/detail/Caption.js | 86 +- components/blog/detail/SocialMedia.js | 46 +- .../blog/detail/commentUser/AddComment.js | 32 +- components/blog/detail/commentUser/index.js | 30 +- components/blog/detail/index.js | 16 +- components/blog/head/index.js | 82 +- components/blog/index.js | 35 +- components/blog/relatedContent/Item.js | 66 +- components/blog/relatedContent/index.js | 25 +- components/blogs/Head.js | 176 +- components/blogs/index.js | 31 +- components/blogs/latestArticles/Article.js | 80 +- components/blogs/latestArticles/index.js | 38 +- components/blogs/title/ItemTitle.js | 35 +- components/blogs/title/index.js | 35 +- components/booking/date/PlaceVisit.js | 43 +- .../booking/date/Time/SelectDatePicker.js | 8 +- components/booking/date/Time/index.js | 24 +- components/booking/date/hour/index.js | 34 +- components/booking/date/index.js | 57 +- components/booking/detail/Content.js | 14 +- components/booking/detail/Form.js | 58 +- components/booking/detail/index.js | 136 +- components/booking/failedPay/index.js | 70 +- components/booking/index.js | 45 +- components/booking/information/Detail.js | 191 +- components/booking/information/Head.js | 42 +- components/booking/information/index.js | 38 +- components/booking/location/Address.js | 34 +- components/booking/location/Head.js | 40 +- components/booking/location/index.js | 24 +- components/booking/paying/ButtonFixed.js | 18 +- components/booking/paying/index.js | 72 +- components/booking/successPay/index.js | 84 +- .../clinic/components/about/ContentDetail.js | 24 +- .../clinic/components/about/ListBime.js | 43 +- .../clinic/components/about/Services.js | 27 +- .../clinic/components/about/Specialties.js | 49 +- .../clinic/components/about/images/Images.js | 49 +- .../clinic/components/about/images/List.js | 102 +- .../clinic/components/about/images/Slider.js | 41 +- components/clinic/components/about/index.js | 81 +- .../components/contact/ContentDetail.js | 24 +- .../clinic/components/contact/Detail.js | 44 +- components/clinic/components/contact/index.js | 95 +- .../components/contact/modal/Content.js | 72 +- .../clinic/components/contact/modal/index.js | 77 +- components/clinic/components/doctors/List.js | 34 +- .../clinic/components/doctors/SearchBar.js | 16 +- components/clinic/components/doctors/index.js | 18 +- components/clinic/index.js | 41 +- components/clinics/head/SearchBar.js | 64 +- components/clinics/head/modal/index.js | 186 +- components/clinics/index.js | 39 +- components/clinics/list/ItemClinic.js | 111 +- components/clinics/list/index.js | 45 +- components/contactUs/Call.js | 67 +- components/contactUs/Connect.js | 68 +- components/contactUs/ContentContact.js | 29 +- components/contactUs/FieldLabel.js | 14 +- components/contactUs/index.js | 18 +- components/dashboard/index.js | 49 +- .../dashboard/userAccount/ContentTabs.js | 187 +- components/dashboard/userAccount/Head.js | 109 +- .../userAccount/NotfoundDashboard.js | 64 +- .../dashboard/userAccount/UserAccount.js | 58 +- .../userAccount/tabs/comments/Comment.js | 132 +- .../userAccount/tabs/comments/index.js | 30 +- .../userAccount/tabs/comments/modal/index.js | 116 +- .../userAccount/tabs/detailUser/Content.js | 32 +- .../tabs/detailUser/DateBirthday.js | 123 +- .../userAccount/tabs/detailUser/Form.js | 217 +- .../userAccount/tabs/detailUser/index.js | 88 +- .../tabs/detailUser/listSelector.js | 42 +- .../userAccount/tabs/messages/Message.js | 74 +- .../userAccount/tabs/messages/index.js | 28 +- .../userAccount/tabs/transactions/Card.js | 155 +- .../userAccount/tabs/transactions/List.js | 194 +- .../userAccount/tabs/transactions/index.js | 16 +- .../dashboard/userAccount/tabs/turns/Card.js | 129 +- .../dashboard/userAccount/tabs/turns/Head.js | 102 +- .../dashboard/userAccount/tabs/turns/List.js | 202 +- .../dashboard/userAccount/tabs/turns/index.js | 31 +- .../tabs/turns/isTurnsDetails/ButtonData.js | 40 +- .../tabs/turns/isTurnsDetails/DetailLg.js | 211 +- .../tabs/turns/isTurnsDetails/DetailSm.js | 181 +- .../tabs/turns/isTurnsDetails/Head.js | 36 +- .../tabs/turns/isTurnsDetails/index.js | 31 +- .../tabs/turns/isTurnsDetails/modal/index.js | 116 +- .../doctor/appointmentList/ItemAppointment.js | 111 +- components/doctor/appointmentList/index.js | 79 +- .../doctor/appointmentList/modal/index.js | 65 +- components/doctor/detailDoctor/Link.js | 78 +- components/doctor/detailDoctor/Share.js | 130 +- components/doctor/detailDoctor/Title.js | 116 +- .../doctor/detailDoctor/cards/AboutDcotor.js | 94 +- .../cards/comments/chart/ProgressAll.js | 62 +- .../cards/comments/chart/index.js | 121 +- .../detailDoctor/cards/comments/index.js | 42 +- .../cards/comments/modal/ModalAnswer.js | 136 +- .../detailDoctor/cards/locations/Item.js | 174 +- .../detailDoctor/cards/locations/index.js | 47 +- components/doctor/detailDoctor/index.js | 38 +- components/doctor/index.js | 59 +- components/doctors/index.js | 59 +- components/doctors/listDoctors/index.js | 36 +- components/doctors/modal/Content.js | 107 +- components/doctors/modal/FilterModal.js | 99 +- components/doctors/modal/RadioContent.js | 24 +- components/doctors/modal/Radios.js | 49 +- components/doctors/search/index.js | 106 +- components/doctors/sortlist/FilterBtn.js | 40 +- components/doctors/sortlist/SelectSort.js | 102 +- components/doctors/sortlist/index.js | 20 +- components/home/FrequentSearches.js | 46 +- components/home/search/index.js | 88 +- components/home/search/modal/index.js | 177 +- components/icons/AText.js | 40 +- components/icons/AddCircleBlueA.js | 40 +- components/icons/AddLocationP.js | 36 +- components/icons/AddTimeP.js | 40 +- components/icons/ArrowBottomD.js | 26 +- components/icons/ArrowBottomGrayD.js | 25 +- components/icons/ArrowBottomH.js | 25 +- components/icons/ArrowBottomHD.js | 21 +- components/icons/ArrowBottomP.js | 25 +- components/icons/ArrowDownF.js | 25 +- components/icons/ArrowDownP.js | 32 +- components/icons/ArrowLeftB.js | 34 +- components/icons/ArrowLeftBlueA.js | 34 +- components/icons/ArrowLeftBlueD.js | 34 +- components/icons/ArrowLeftBlueP.js | 26 +- components/icons/ArrowLeftButtonP.js | 34 +- components/icons/ArrowLeftC.js | 34 +- components/icons/ArrowLeftCardD.js | 25 +- components/icons/ArrowLeftD.js | 34 +- components/icons/ArrowLeftM.js | 34 +- components/icons/ArrowLeftOrangeA.js | 17 +- components/icons/ArrowLeftOrangeS.js | 34 +- components/icons/ArrowLeftP.js | 34 +- components/icons/ArrowLeftPA.js | 34 +- components/icons/ArrowLeftPH.js | 25 +- components/icons/ArrowLeftPU.js | 25 +- components/icons/ArrowLeftSideBar.js | 25 +- components/icons/ArrowLeftWD.js | 34 +- components/icons/ArrowLeftWhiteD.js | 34 +- components/icons/ArrowRightD.js | 34 +- components/icons/ArrowRightP.js | 34 +- components/icons/ArrowRightPH.js | 34 +- components/icons/ArrowRightS.js | 34 +- components/icons/ArrowUpComment.js | 24 +- components/icons/BText.js | 40 +- components/icons/BoldDisLikeComment.js | 26 +- components/icons/BoldLikeComment.js | 26 +- components/icons/BottomSelect.js | 26 +- components/icons/CalendarA.js | 100 +- components/icons/CalendarAdD.js | 104 +- components/icons/CalendarAddF.js | 102 +- components/icons/CalendarD.js | 100 +- components/icons/CalendarEdit.js | 95 +- components/icons/CalendarP.js | 28 +- components/icons/CalendarPD.js | 100 +- components/icons/CalendarTickGreenP.js | 33 +- components/icons/CallC.js | 23 +- components/icons/CallD.js | 23 +- components/icons/CalndarD.js | 101 +- components/icons/CardD.js | 51 +- components/icons/CardDA.js | 52 +- components/icons/CardOrangeP.js | 34 +- components/icons/CardTickD.js | 56 +- components/icons/CategoryP.js | 40 +- components/icons/ClockA.js | 32 +- components/icons/ClockClinic.js | 32 +- components/icons/ClockD.js | 32 +- components/icons/ClockP.js | 32 +- components/icons/ClockTurn.js | 32 +- components/icons/CloseModalD.js | 21 +- components/icons/CloseOrangeModal.js | 21 +- components/icons/CopyBlueD.js | 26 +- components/icons/DisLikeComment.js | 26 +- components/icons/DoubleArrowLeftP.js | 17 +- components/icons/DownloadD.js | 40 +- components/icons/EditGrayA.js | 31 +- components/icons/EditLogin.js | 42 +- components/icons/EditOrangeA.js | 31 +- components/icons/EditOrangeAD.js | 43 +- components/icons/EditTurnsD.js | 43 +- components/icons/EmailC.js | 34 +- components/icons/ExportP.js | 40 +- components/icons/GreenCalendarTurn.js | 100 +- components/icons/InfoCircleRedA.js | 22 +- components/icons/Instagram.js | 39 +- components/icons/LikeComment.js | 26 +- components/icons/LikeD.js | 26 +- components/icons/LikeDI.js | 26 +- components/icons/Linkedin.js | 24 +- components/icons/LinkedinB.js | 24 +- components/icons/LinkedingBlueD.js | 23 +- components/icons/Location.js | 28 +- components/icons/LocationA.js | 28 +- components/icons/LocationClinic.js | 28 +- components/icons/LocationD.js | 28 +- components/icons/LocationF.js | 32 +- components/icons/LocationP.js | 28 +- components/icons/LocationTurn.js | 28 +- components/icons/LogoPanel.js | 57 +- components/icons/LogoPanelHead.js | 51 +- components/icons/LogoutD.js | 43 +- components/icons/LogoutOrangeP.js | 43 +- components/icons/LogoutP.js | 43 +- components/icons/MenuS.js | 55 +- components/icons/MessageD.js | 34 +- components/icons/MessageNotifD.js | 57 +- components/icons/MoonP.js | 24 +- components/icons/NotFoundCover.js | 194 +- components/icons/NotificationD.js | 31 +- components/icons/NotificationP.js | 31 +- components/icons/NumberNotFound.js | 28 +- components/icons/PeopleBlueP.js | 48 +- components/icons/PlusBlueP.js | 32 +- components/icons/PointD.js | 21 +- components/icons/ProfileAddP.js | 28 +- components/icons/ProfileCircleP.js | 28 +- components/icons/ProfileD.js | 32 +- components/icons/ProfileP.js | 32 +- components/icons/ProfilePA.js | 32 +- components/icons/RedoA.js | 33 +- components/icons/RefreshA.js | 24 +- components/icons/RetryLogin.js | 39 +- components/icons/RoutingC.js | 64 +- components/icons/RoutingWhiteC.js | 64 +- components/icons/Search.js | 32 +- components/icons/SearchD.js | 33 +- components/icons/SearchHeaderP.js | 32 +- components/icons/SettingD.js | 35 +- components/icons/SettingP.js | 26 +- components/icons/SettingPA.js | 26 +- components/icons/ShareDI.js | 23 +- components/icons/SortD.js | 37 +- components/icons/StarDI.js | 21 +- components/icons/StethoscopeF.js | 33 +- components/icons/Telegram.js | 22 +- components/icons/TelegramB.js | 23 +- components/icons/TelegramBlueD.js | 22 +- components/icons/TickCircle.js | 32 +- components/icons/TickCircleGreenA.js | 22 +- components/icons/TickCircleOrange.js | 33 +- components/icons/TickOrangeA.js | 22 +- components/icons/TicketD.js | 33 +- components/icons/TrashOrangeD.js | 56 +- components/icons/Underline.js | 19 +- components/icons/UnderlineLG.js | 19 +- components/icons/UserLogin.js | 32 +- components/icons/WarnP.js | 28 +- components/icons/Whatsapp.js | 31 +- components/icons/WhatsappB.js | 22 +- components/icons/WhatsappBlueD.js | 21 +- components/icons/WhatsappC.js | 32 +- components/layout/footer/LogoNamad.js | 35 +- components/layout/footer/index.js | 177 +- components/layout/footer/menu/HeadMenu.js | 34 +- components/layout/footer/menu/ListMenu.js | 26 +- components/layout/header/index.js | 93 +- components/layout/header/list/Row.js | 38 +- components/layout/header/list/col/BgGray.js | 20 +- .../layout/header/list/col/ButtonMenu.js | 50 +- components/layout/header/list/col/index.js | 64 +- components/layout/index.js | 112 +- components/layout/sidebar/Cards.js | 64 +- components/layout/sidebar/Head.js | 36 +- components/layout/sidebar/List.js | 120 +- components/layout/sidebar/ModalLogout.js | 85 +- components/layout/sidebar/index.js | 65 +- components/layoutPanel/header/Icons.js | 72 +- components/layoutPanel/header/MenuProfile.js | 203 +- components/layoutPanel/header/Search.js | 102 +- .../header/sideButton/ButtonMenu.js | 30 +- .../layoutPanel/header/sideButton/index.js | 22 +- components/layoutPanel/index.js | 41 +- components/layoutPanel/sidebar/BgGray.js | 20 +- components/layoutPanel/sidebar/HeadMd.js | 50 +- components/layoutPanel/sidebar/HeadSm.js | 30 +- components/layoutPanel/sidebar/Links.js | 83 +- components/layoutPanel/sidebar/index.js | 5 +- .../layoutPanel/userDetail/Activities.js | 69 +- components/layoutPanel/userDetail/Date.js | 17 +- components/layoutPanel/userDetail/Head.js | 107 +- components/layoutPanel/userDetail/index.js | 26 +- components/loginVerify/index.js | 6 +- components/notFound/index.js | 82 +- components/panel/ColTable.js | 119 +- components/panel/ContentText.js | 14 +- components/panel/addDoctor/index.js | 85 +- components/panel/addDoctor/listMenu/Menu.js | 72 +- components/panel/addDoctor/listMenu/Tab.js | 62 +- .../listMenu/generalInformation/Head.js | 36 +- .../listMenu/generalInformation/form/Form.js | 172 +- .../generalInformation/form/RadioGender.js | 34 +- .../generalInformation/form/listSelector.js | 10 +- .../listMenu/generalInformation/index.js | 14 +- components/panel/addDoctor/listMenu/index.js | 38 +- .../listMenu/officeInformation/Form.js | 135 +- .../listMenu/officeInformation/index.js | 30 +- .../officeInformation/listSelector.js | 18 +- .../addDoctor/listMenu/specialDays/Form.js | 162 +- .../addDoctor/listMenu/specialDays/List.js | 145 +- .../addDoctor/listMenu/specialDays/index.js | 34 +- .../listMenu/specialDays/listSelector.js | 30 +- .../panel/addDoctor/listMenu/turns/Form.js | 60 +- .../panel/addDoctor/listMenu/turns/index.js | 30 +- .../addDoctor/listMenu/turns/listSelector.js | 18 +- .../addDoctor/listMenu/workingDays/List.js | 262 +- .../addDoctor/listMenu/workingDays/index.js | 18 +- .../workingDays/modal/ContentModal.js | 90 +- .../listMenu/workingDays/modal/Form.js | 74 +- .../workingDays/modal/ModalAddTime.js | 44 +- .../listMenu/workingDays/modal/Radios.js | 36 +- components/panel/dashboard/Cards.js | 41 +- .../panel/dashboard/amountOfIncome/Chart.js | 139 +- .../panel/dashboard/amountOfIncome/Head.js | 81 +- .../panel/dashboard/amountOfIncome/index.js | 22 +- components/panel/dashboard/index.js | 35 +- components/panel/dashboard/list/Table.js | 140 +- components/panel/dashboard/list/index.js | 48 +- components/panel/turns/head/Date.js | 39 +- components/panel/turns/head/SearchDoctor.js | 92 +- components/panel/turns/head/index.js | 26 +- components/panel/turns/index.js | 30 +- components/panel/turns/list/Cards.js | 8 +- components/panel/turns/list/Table.js | 131 +- components/panel/turns/list/index.js | 18 +- components/panel/userAccount/Head.js | 30 +- components/panel/userAccount/form/index.js | 188 +- .../panel/userAccount/form/listSelector.js | 26 +- components/panel/userAccount/index.js | 18 +- components/register/LogInPage.js | 69 +- components/register/SetCodePage.js | 214 +- components/register/element/OTPForm.js | 41 +- components/register/index.js | 68 +- components/searchHead/LgSearch.js | 6 +- components/searchHead/SmSearch.js | 68 +- components/specialties/index.js | 39 +- .../specialties/list/ItemSpecialties.js | 18 +- components/specialties/list/index.js | 56 +- constans/index.js | 33 +- data/articles.json | 7746 +-- data/clinics.json | 3122 +- data/doctors.json | 57534 ++++++++-------- data/information.json | 157 +- data/specialties.json | 242 +- helper/index.js | 24 +- mui/index.js | 48 +- 410 files changed, 47636 insertions(+), 43842 deletions(-) diff --git a/app/about-us/page.js b/app/about-us/page.js index 6cb9532..ffe2d8a 100644 --- a/app/about-us/page.js +++ b/app/about-us/page.js @@ -1,12 +1,12 @@ -import AboutUsPage from '@/components/aboutUs'; -import Layout from '@/components/layout'; +import AboutUsPage from "@/components/aboutUs"; +import Layout from "@/components/layout"; function AboutUs() { - return ( - - - - ) + return ( + + + + ); } -export default AboutUs \ No newline at end of file +export default AboutUs; diff --git a/app/blog/[slug]/page.js b/app/blog/[slug]/page.js index 239ff2a..b3343b3 100644 --- a/app/blog/[slug]/page.js +++ b/app/blog/[slug]/page.js @@ -1,19 +1,15 @@ -import BlogPage from '@/components/blog'; -import Layout from '@/components/layout'; -import articles from '@/data/articles.json'; +import BlogPage from "@/components/blog"; +import Layout from "@/components/layout"; +import articles from "@/data/articles.json"; function Blog({ params: { slug } }) { + const article = articles.find((item) => item.id === +slug); - const article = articles.find(item => item.id === +slug); - - return ( - - - - ) + return ( + + + + ); } -export default Blog \ No newline at end of file +export default Blog; diff --git a/app/blogs/page.js b/app/blogs/page.js index 6a82c98..5e08f14 100644 --- a/app/blogs/page.js +++ b/app/blogs/page.js @@ -1,12 +1,12 @@ -import BlogsPage from '@/components/blogs' -import Layout from '@/components/layout' +import BlogsPage from "@/components/blogs"; +import Layout from "@/components/layout"; function Blogs() { - return ( - - - - ) + return ( + + + + ); } -export default Blogs \ No newline at end of file +export default Blogs; diff --git a/app/booking/[slug]/page.js b/app/booking/[slug]/page.js index 77dfd10..28c546c 100644 --- a/app/booking/[slug]/page.js +++ b/app/booking/[slug]/page.js @@ -1,68 +1,71 @@ -'use client' +"use client"; -import { useState } from 'react'; +import { useState } from "react"; -import Layout from '@/components/layout'; -import doctors from '@/data/doctors.json'; -import Date from '@/components/booking/date'; -import BookingPage from '@/components/booking'; -import RegisterPage from '@/components/register'; -import Paying from '@/components/booking/paying'; -import Detail from '@/components/booking/detail'; -import FailedPay from '@/components/booking/failedPay'; -import LogInPage from '@/components/register/LogInPage'; -import SuccessPay from '@/components/booking/successPay'; -import SetCodePage from '@/components/register/SetCodePage'; +import Layout from "@/components/layout"; +import doctors from "@/data/doctors.json"; +import Date from "@/components/booking/date"; +import BookingPage from "@/components/booking"; +import RegisterPage from "@/components/register"; +import Paying from "@/components/booking/paying"; +import Detail from "@/components/booking/detail"; +import FailedPay from "@/components/booking/failedPay"; +import LogInPage from "@/components/register/LogInPage"; +import SuccessPay from "@/components/booking/successPay"; +import SetCodePage from "@/components/register/SetCodePage"; function Booking({ params: { slug } }) { + const doctor = doctors.find((item) => item.id === +slug); - const doctor = doctors.find(item => item.id === +slug); + const [step, setStep] = useState(0); + const [isForAnother, setIsForAnother] = useState(false); - const [step, setStep] = useState(0); - const [isForAnother, setIsForAnother] = useState(false); + const [data, setData] = useState({ + phone: { value: "09121056987", isEdit: false }, + codemeli: { value: "1741025645", isEdit: false }, + name: { value: "ساغر صابری نژاد", isEdit: false }, + }); - const [data, setData] = useState({ - phone: { value: '09121056987', isEdit: false }, - codemeli: { value: '1741025645', isEdit: false }, - name: { value: 'ساغر صابری نژاد', isEdit: false } - }); + const elements = [ + , + , + , + , + , + , + , + ]; - const elements = [ - , - , - , - , - , - , - - ] - - return ( - <> - {step === 1 || step === 2 ? ( - - {elements[step]} - - ) : ( - 2} - paddingBottom='pb-[80px]' - > - - {elements[step]} - - - )} - - ) + return ( + <> + {step === 1 || step === 2 ? ( + {elements[step]} + ) : ( + 2} + paddingBottom="pb-[80px]" + > + + {elements[step]} + + + )} + + ); } -export default Booking \ No newline at end of file +export default Booking; diff --git a/app/clinic/[slug]/page.js b/app/clinic/[slug]/page.js index e515b36..5eab091 100644 --- a/app/clinic/[slug]/page.js +++ b/app/clinic/[slug]/page.js @@ -1,20 +1,16 @@ -import ClinicPage from '@/components/clinic'; -import Layout from '@/components/layout'; -import clinics from '@/data/clinics.json'; -import doctors from '@/data/doctors.json'; +import ClinicPage from "@/components/clinic"; +import Layout from "@/components/layout"; +import clinics from "@/data/clinics.json"; +import doctors from "@/data/doctors.json"; function Blog({ params: { slug } }) { + const clinic = clinics.find((item) => item.id === +slug); - const clinic = clinics.find(item => item.id === +slug); - - return ( - - - - ) + return ( + + + + ); } -export default Blog \ No newline at end of file +export default Blog; diff --git a/app/clinics/page.js b/app/clinics/page.js index 923b314..60118fa 100644 --- a/app/clinics/page.js +++ b/app/clinics/page.js @@ -1,12 +1,12 @@ -import ClinicsPage from '@/components/clinics'; -import Layout from '@/components/layout'; +import ClinicsPage from "@/components/clinics"; +import Layout from "@/components/layout"; function Clinics() { - return ( - - - - ) + return ( + + + + ); } -export default Clinics \ No newline at end of file +export default Clinics; diff --git a/app/component/AnimationTextHead.js b/app/component/AnimationTextHead.js index 1dfca2e..83c9917 100644 --- a/app/component/AnimationTextHead.js +++ b/app/component/AnimationTextHead.js @@ -1,16 +1,19 @@ function AnimationTextHead({ name, text, children }) { - return ( -
-
-

{text}

-
-
- {children} -
-
- ) + return ( +
+
+

+ {text} +

+
+
+ {children} +
+
+ ); } -export default AnimationTextHead \ No newline at end of file +export default AnimationTextHead; diff --git a/app/component/CustomTable.js b/app/component/CustomTable.js index 33e7fae..3cdf04c 100644 --- a/app/component/CustomTable.js +++ b/app/component/CustomTable.js @@ -1,39 +1,46 @@ -import { Table, TableBody, TableCell, TableContainer, TableHead, TableRow } from '@mui/material' +import { + Table, + TableBody, + TableCell, + TableContainer, + TableHead, + TableRow, +} from "@mui/material"; function CustomTable({ tableHead, zeroRadius, centerTable, children }) { - return ( - - - - - {tableHead.map((item, idx) => ( - +
+ + + {tableHead.map((item, idx) => ( + - {item} - - ))} - - - - {children} - -
-
- ) + > + {item} + + ))} + + + {children} + + + ); } -export default CustomTable \ No newline at end of file +export default CustomTable; diff --git a/app/component/EditField.js b/app/component/EditField.js index 3a69320..212bc6f 100644 --- a/app/component/EditField.js +++ b/app/component/EditField.js @@ -1,55 +1,63 @@ -import EditGrayA from "@/components/icons/EditGrayA" -import EditOrangeA from "@/components/icons/EditOrangeA" -import { Button, TextField } from "@mui/material" +import EditGrayA from "@/components/icons/EditGrayA"; +import EditOrangeA from "@/components/icons/EditOrangeA"; +import { Button, TextField } from "@mui/material"; -function EditField({ changeData, multiline, icon, placeholder, data, name, iconGray, isTransparent }) { - return ( -
- { - changeData(e.target.value, 'value', name) - }} - sx={{ - '& .MuiFormLabel-root': { - top: '-4px !important' - }, - '& .MuiInputBase-input': { padding: '12.5px 14px' }, - '& .MuiOutlinedInput-notchedOutline': { border: '1px solid #D7D7D7 !important' }, - '& .MuiInputBase-root': { - padding: '0 !important', - borderRadius: '8px !important' - }, - '.Mui-focused': { - '& .MuiOutlinedInput-notchedOutline': { - border: '1px solid #5559CE !important', - transition: '0.5s all' - } - } - }} - /> - -
- ) +function EditField({ + changeData, + multiline, + icon, + placeholder, + data, + name, + iconGray, + isTransparent, +}) { + return ( +
+ { + changeData(e.target.value, "value", name); + }} + sx={{ + "& .MuiFormLabel-root": { + top: "-4px !important", + }, + "& .MuiInputBase-input": { padding: "12.5px 14px" }, + "& .MuiOutlinedInput-notchedOutline": { + border: "1px solid #D7D7D7 !important", + }, + "& .MuiInputBase-root": { + padding: "0 !important", + borderRadius: "8px !important", + }, + ".Mui-focused": { + "& .MuiOutlinedInput-notchedOutline": { + border: "1px solid #5559CE !important", + transition: "0.5s all", + }, + }, + }} + /> + +
+ ); } -export default EditField \ No newline at end of file +export default EditField; diff --git a/app/component/Field.js b/app/component/Field.js index 82f2903..2efa08b 100644 --- a/app/component/Field.js +++ b/app/component/Field.js @@ -1,30 +1,32 @@ -import { TextField } from "@mui/material" +import { TextField } from "@mui/material"; function Field({ title, type, multiline, isPlaceHolder }) { - return ( - - ) + return ( + + ); } -export default Field \ No newline at end of file +export default Field; diff --git a/app/component/FieldIcon.js b/app/component/FieldIcon.js index c352127..d873f87 100644 --- a/app/component/FieldIcon.js +++ b/app/component/FieldIcon.js @@ -1,42 +1,42 @@ -import EditGrayA from "@/components/icons/EditGrayA" -import EditOrangeA from "@/components/icons/EditOrangeA" -import { Button, TextField } from "@mui/material" +import EditGrayA from "@/components/icons/EditGrayA"; +import EditOrangeA from "@/components/icons/EditOrangeA"; +import { Button, TextField } from "@mui/material"; function FieldIcon({ changeData, icon, placeholder, name }) { - return ( -
- { - changeData(e.target.value, name) - }} - sx={{ - '& .MuiFormLabel-root': { - top: '-4px !important' - }, - '& .MuiInputBase-input': { padding: '12.5px 14px' }, - '& .MuiOutlinedInput-notchedOutline': { border: '1px solid #D7D7D7 !important' }, - '& .MuiInputBase-root': { - padding: '0 !important', - borderRadius: '8px !important' - }, - '.Mui-focused': { - '& .MuiOutlinedInput-notchedOutline': { - border: '1px solid #5559CE !important', - transition: '0.5s all' - } - } - }} - /> - -
- ) + return ( +
+ { + changeData(e.target.value, name); + }} + sx={{ + "& .MuiFormLabel-root": { + top: "-4px !important", + }, + "& .MuiInputBase-input": { padding: "12.5px 14px" }, + "& .MuiOutlinedInput-notchedOutline": { + border: "1px solid #D7D7D7 !important", + }, + "& .MuiInputBase-root": { + padding: "0 !important", + borderRadius: "8px !important", + }, + ".Mui-focused": { + "& .MuiOutlinedInput-notchedOutline": { + border: "1px solid #5559CE !important", + transition: "0.5s all", + }, + }, + }} + /> + +
+ ); } -export default FieldIcon \ No newline at end of file +export default FieldIcon; diff --git a/app/component/ItemDoctor.js b/app/component/ItemDoctor.js index 743fe1d..dabbba0 100644 --- a/app/component/ItemDoctor.js +++ b/app/component/ItemDoctor.js @@ -12,75 +12,86 @@ import TextLoading from "./loading/Text"; import CircularLoading from "./loading/Circular"; function ItemDoctor({ doctor, loading }) { - return ( -
  • - {/* Detail Doctor */} -
    - - image-doctor - -
    - -

    {doctor.name}

    -
    - -

    تخصص: {doctor.expertise}

    -
    - -
    -
    - -

    {doctor.satisfaction}%

    -
    -
    - -

    {doctor.point}

    -
    -
    -
    -
    + return ( +
  • + {/* Detail Doctor */} +
    + + image-doctor + +
    + +

    + {doctor.name} +

    +
    + +

    + تخصص: {doctor.expertise} +

    +
    + +
    +
    + +

    + {doctor.satisfaction}% +

    +
    +
    + +

    + {doctor.point} +

    +
    +
    +
    +
    - {/* Hours of work */} -
    - - -

    ساعت کاری: {doctor.hours_of_work}

    -
    -
    - -

    {doctor.free_turn ? - `اولین نوبت آزاد: ${doctor.free_turn}` : - 'نوبت ندارد' - }

    -
    - {/* Arrow */} - - - -
  • - ) + disabled={!doctor.free_turn || loading} + > + + + + + ); } -export default ItemDoctor \ No newline at end of file +export default ItemDoctor; diff --git a/app/component/Logo.js b/app/component/Logo.js index 83e01d5..1324643 100644 --- a/app/component/Logo.js +++ b/app/component/Logo.js @@ -1,22 +1,24 @@ -import Image from 'next/image' -import Link from 'next/link' -import React from 'react' +import Image from "next/image"; +import Link from "next/link"; +import React from "react"; function Logo({ isAbsolute }) { - return ( - -
    - logo -

    نوبت ۷۲۴

    -
    - - ) + return ( + +
    + logo +

    + نوبت ۷۲۴ +

    +
    + + ); } -export default Logo \ No newline at end of file +export default Logo; diff --git a/app/component/Pageguide.js b/app/component/Pageguide.js index 581b92b..2e50a82 100644 --- a/app/component/Pageguide.js +++ b/app/component/Pageguide.js @@ -1,26 +1,31 @@ function Pageguide({ list }) { - return ( -
      - {list.map((item, idx) => ( -
    • -

      idx + 1 ? 'text-[#9B9B9B]' : 'text-[#525252]'} + return ( +

        + {list.map((item, idx) => ( +
      • +

        idx + 1 + ? "text-[#9B9B9B]" + : "text-[#525252]" + } `} - >{item}

        - + {item} +

        + idx + 1 ? 'flex' : 'hidden'} + ${list.length > idx + 1 ? "flex" : "hidden"} `} - >{'>'} -
      • - ))} -
      - ) + > + {">"} + +
    • + ))} +
    + ); } -export default Pageguide \ No newline at end of file +export default Pageguide; diff --git a/app/component/Pagination.js b/app/component/Pagination.js index 9c2ee3a..650818a 100644 --- a/app/component/Pagination.js +++ b/app/component/Pagination.js @@ -1,26 +1,27 @@ -import { Pagination as PaginationMUI } from '@mui/material' +import { Pagination as PaginationMUI } from "@mui/material"; function Pagination() { - return ( - - ) + return ( + + ); } -export default Pagination \ No newline at end of file +export default Pagination; diff --git a/app/component/ProfressDetail.js b/app/component/ProfressDetail.js index 17d17b6..64995df 100644 --- a/app/component/ProfressDetail.js +++ b/app/component/ProfressDetail.js @@ -1,24 +1,28 @@ -import { numberToArStyle } from "@/helper" -import { LinearProgress } from "@mui/material" +import { numberToArStyle } from "@/helper"; +import { LinearProgress } from "@mui/material"; function ProgressDetail({ data }) { - return ( -
  • -

    {data.label}

    - -

    {numberToArStyle(data.progress)}%

    -
  • - ) + return ( +
  • +

    + {data.label} +

    + +

    + {numberToArStyle(data.progress)}% +

    +
  • + ); } -export default ProgressDetail \ No newline at end of file +export default ProgressDetail; diff --git a/app/component/ProgressChange.js b/app/component/ProgressChange.js index bb22d36..0171d4e 100644 --- a/app/component/ProgressChange.js +++ b/app/component/ProgressChange.js @@ -1,41 +1,40 @@ -import { Slider } from "@mui/material" -import { useState } from "react" +import { Slider } from "@mui/material"; +import { useState } from "react"; function ProgressChange({ data }) { + const [value, setValue] = useState(70); - const [value, setValue] = useState(70) - - return ( -
  • -

    {data.label}

    - setValue(e.target.value)} - sx={{ - '& .MuiSlider-rail': { - background: '#E8E8E8', - opacity: '100' - }, - '& .MuiSlider-track': { - background: '#05BA58', - border: 'none' - }, - '& .MuiSlider-thumb': { - marginRight: '-21px', - background: '#EBEBEB', - border: '1px solid #05BA58 !important' - }, - '& .MuiSlider-thumb.Mui-focusVisible, .MuiSlider-thumb:hover': { - boxShadow: 'none' - }, - }} - /> -

    - {value} -

    -
  • - ) + return ( +
  • +

    + {data.label} +

    + setValue(e.target.value)} + sx={{ + "& .MuiSlider-rail": { + background: "#E8E8E8", + opacity: "100", + }, + "& .MuiSlider-track": { + background: "#05BA58", + border: "none", + }, + "& .MuiSlider-thumb": { + marginRight: "-21px", + background: "#EBEBEB", + border: "1px solid #05BA58 !important", + }, + "& .MuiSlider-thumb.Mui-focusVisible, .MuiSlider-thumb:hover": { + boxShadow: "none", + }, + }} + /> +

    {value}

    +
  • + ); } -export default ProgressChange \ No newline at end of file +export default ProgressChange; diff --git a/app/component/Tabs.js b/app/component/Tabs.js index eac54fb..2224c6d 100644 --- a/app/component/Tabs.js +++ b/app/component/Tabs.js @@ -1,41 +1,39 @@ -import { Box, Tab, Tabs as TabsMUI } from '@mui/material'; +import { Box, Tab, Tabs as TabsMUI } from "@mui/material"; function a11yProps(index) { - return { - id: `simple-tab-${index}`, - 'aria-controls': `simple-tabpanel-${index}`, - }; -}; - -function Tabs({ value, handleChange, listTab, isSm, style }) { - return ( - - - {listTab.map((item, idx) => ( - - ))} - - - ) + return { + id: `simple-tab-${index}`, + "aria-controls": `simple-tabpanel-${index}`, + }; } -export default Tabs \ No newline at end of file +function Tabs({ value, handleChange, listTab, isSm, style }) { + return ( + + + {listTab.map((item, idx) => ( + + ))} + + + ); +} + +export default Tabs; diff --git a/app/component/ThemeRegistry.js b/app/component/ThemeRegistry.js index d5153d7..56ee4e0 100644 --- a/app/component/ThemeRegistry.js +++ b/app/component/ThemeRegistry.js @@ -1,65 +1,63 @@ // app/ThemeRegistry.tsx -'use client'; -import createCache from '@emotion/cache'; -import { prefixer } from 'stylis'; -import rtlPlugin from 'stylis-plugin-rtl'; -import { useServerInsertedHTML } from 'next/navigation'; -import { CacheProvider, ThemeProvider } from '@emotion/react'; -import React from 'react'; -import theme from '../theme/theme'; +"use client"; +import createCache from "@emotion/cache"; +import { prefixer } from "stylis"; +import rtlPlugin from "stylis-plugin-rtl"; +import { useServerInsertedHTML } from "next/navigation"; +import { CacheProvider, ThemeProvider } from "@emotion/react"; +import React from "react"; +import theme from "../theme/theme"; // This implementation is from emotion-js // https://github.com/emotion-js/emotion/issues/2928#issuecomment-1319747902 -export default function ThemeRegistry({ - children -}) { - const options = { - key: 'muirtl', - stylisPlugins: [prefixer, rtlPlugin], +export default function ThemeRegistry({ children }) { + const options = { + key: "muirtl", + stylisPlugins: [prefixer, rtlPlugin], + }; + const [{ cache, flush }] = React.useState(() => { + const cache = createCache(options); + cache.compat = true; + const prevInsert = cache.insert; + let inserted = []; + cache.insert = (...args) => { + const serialized = args[1]; + if (cache.inserted[serialized.name] === undefined) { + inserted.push(serialized.name); + } + return prevInsert(...args); + }; + const flush = () => { + const prevInserted = inserted; + inserted = []; + return prevInserted; + }; + return { cache, flush }; + }); + + useServerInsertedHTML(() => { + const names = flush(); + if (names.length === 0) { + return null; + } + let styles = ""; + for (const name of names) { + styles += cache.inserted[name]; } - const [{ cache, flush }] = React.useState(() => { - const cache = createCache(options); - cache.compat = true; - const prevInsert = cache.insert; - let inserted = []; - cache.insert = (...args) => { - const serialized = args[1]; - if (cache.inserted[serialized.name] === undefined) { - inserted.push(serialized.name); - } - return prevInsert(...args); - }; - const flush = () => { - const prevInserted = inserted; - inserted = []; - return prevInserted; - }; - return { cache, flush }; - }); - - useServerInsertedHTML(() => { - const names = flush(); - if (names.length === 0) { - return null; - } - let styles = ''; - for (const name of names) { - styles += cache.inserted[name]; - } - return ( -