change format all file

This commit is contained in:
Ehsan
2025-05-18 01:18:35 +03:30
parent 4a57468e26
commit 254d5d4ebd
84 changed files with 721 additions and 651 deletions
+2 -4
View File
@@ -2,11 +2,9 @@ import RegisterPage from "@/components/register";
import { getStateInfo } from "@/lib/getStateInfo";
function ContentLogin() {
const { matchedCity } = getStateInfo();
const { matchedCity } = getStateInfo();
return (
<RegisterPage matchedCity={matchedCity} />
);
return <RegisterPage matchedCity={matchedCity} />;
}
export default ContentLogin;
+13 -13
View File
@@ -6,20 +6,20 @@ import LogInPage from "@/components/register/LogInPage";
import { useState } from "react";
function ContentVerify() {
const [isSendMsg, setIsSendMsg] = useState(false);
const [isSendMsg, setIsSendMsg] = useState(false);
return (
<RegisterPage>
{isSendMsg ? (
<SetCodePage
setIsSendMsg={setIsSendMsg}
link={`/account/${localStorage.getItem("doctor-id")}`}
/>
) : (
<LogInPage setIsSendMsg={setIsSendMsg} />
)}
</RegisterPage>
);
return (
<RegisterPage>
{isSendMsg ? (
<SetCodePage
setIsSendMsg={setIsSendMsg}
link={`/account/${localStorage.getItem("doctor-id")}`}
/>
) : (
<LogInPage setIsSendMsg={setIsSendMsg} />
)}
</RegisterPage>
);
}
export default ContentVerify;
+35 -33
View File
@@ -4,41 +4,43 @@ import Link from "next/link";
const about = ["سوالات متداول", "تماس با ما", "درباره ما"];
function LayoutRegister({ children, matchedCity }) {
return (
<div
className="flex padding-responsive items-center justify-center pt-[32px]
return (
<div
className="flex padding-responsive items-center justify-center pt-[32px]
overflow-auto flex-col h-screen w-full bg-banner-stroke !bg-bottom !bg-no-repeat !bg-cover
!pb-[60px] md:!pb-[60px]"
>
<Link href="/">
<div className="flex items-center justify-center gap-[5px] sm:mt-0">
<Image
src="/assets/images/logo.png"
width={40}
height={40}
alt="logo"
/>
<p className="text-[#5559CE] text-[20px] font-bold">{matchedCity?.site_name || "نوبت ۷۲۴"}</p>
</div>
</Link>
{children}
<div className="fixed bottom-0 left-0 bg-[#FAFAFA] w-full pb-[10px] md:pb-[14px] px-[18px] sm:px-[67px] md:px[117px] lg:px-[166px]">
<div className="bg-border-t-gradient-sign h-px w-full"></div>
<div className="flex items-center justify-center gap-[32px] sm:gap-[40px] md:gap-[48px] lg:gap-[56px] mt-[10px] md:mt-[14px]">
{about.map((item, idx) => (
<Link href="/" key={idx}>
<p
className="text-[#494CB3] text-[14px] md:text-[16px] font-normal"
key={idx}
>
{item}
</p>
</Link>
))}
</div>
</div>
>
<Link href="/">
<div className="flex items-center justify-center gap-[5px] sm:mt-0">
<Image
src="/assets/images/logo.png"
width={40}
height={40}
alt="logo"
/>
<p className="text-[#5559CE] text-[20px] font-bold">
{matchedCity?.site_name || "نوبت ۷۲۴"}
</p>
</div>
)
</Link>
{children}
<div className="fixed bottom-0 left-0 bg-[#FAFAFA] w-full pb-[10px] md:pb-[14px] px-[18px] sm:px-[67px] md:px[117px] lg:px-[166px]">
<div className="bg-border-t-gradient-sign h-px w-full"></div>
<div className="flex items-center justify-center gap-[32px] sm:gap-[40px] md:gap-[48px] lg:gap-[56px] mt-[10px] md:mt-[14px]">
{about.map((item, idx) => (
<Link href="/" key={idx}>
<p
className="text-[#494CB3] text-[14px] md:text-[16px] font-normal"
key={idx}
>
{item}
</p>
</Link>
))}
</div>
</div>
</div>
);
}
export default LayoutRegister
export default LayoutRegister;
+19 -12
View File
@@ -6,7 +6,7 @@ import { useState } from "react";
function LogInPage({ setIsSendMsg, setStep, matchedCity }) {
const [num, setNum] = useState("");
const [error, setError] = useState({ valid: true, text: '' });
const [error, setError] = useState({ valid: true, text: "" });
const handleChange = (val) => {
const formatted = formatPhoneNumber(val);
@@ -34,28 +34,35 @@ function LogInPage({ setIsSendMsg, setStep, matchedCity }) {
error={!error.valid}
spaceNull={true}
inputProps={{
startAdornment:
startAdornment: (
<InputAdornment
className="!ml-4"
position="start"
sx={{
'.MuiTypography-root': {
lineHeight: '0 !important',
".MuiTypography-root": {
lineHeight: "0 !important",
},
".muirtl-1qj5e5k-MuiTypography-root": {
color: "#000000de !important",
},
'.muirtl-1qj5e5k-MuiTypography-root': {
color: '#000000de !important'
}
}}
>09</InputAdornment>,
>
09
</InputAdornment>
),
}}
title="شماره همراه"
updateState={handleChange}
/>
<p className={`
<p
className={`
text-[#d32f2f] text-[14px] mt-2 min-h-[21px] transition-all duration-1000 ease-in-out
transform
${error.valid ? 'opacity-0 -translate-y-1' : 'opacity-100 translate-y-0'}
`}>{error.text}</p>
${error.valid ? "opacity-0 -translate-y-1" : "opacity-100 translate-y-0"}
`}
>
{error.text}
</p>
</div>
<Button
fullWidth
@@ -77,7 +84,7 @@ function LogInPage({ setIsSendMsg, setStep, matchedCity }) {
<Link href="/">
<span className="text-[#F17732] underline">قوانین استفاده</span>
</Link>{" "}
از {matchedCity?.site_name || 'نوبت 724'} را می پذیرم.
از {matchedCity?.site_name || "نوبت 724"} را می پذیرم.
</p>
</div>
);
+5 -1
View File
@@ -13,7 +13,11 @@ function RegisterPage({ matchedCity }) {
{isSendMsg ? (
<SetCodePage setIsSendMsg={setIsSendMsg} setStep={false} link="/" />
) : (
<LogInPage matchedCity={matchedCity} setStep={false} setIsSendMsg={setIsSendMsg} />
<LogInPage
matchedCity={matchedCity}
setStep={false}
setIsSendMsg={setIsSendMsg}
/>
)}
</LayoutRegister>
);