reza fixed some bug

temp
Reza_ashrafi 3 years ago
parent cba7108f93
commit 544ba37bb1
  1. 2
      src/components/Button/index.js
  2. 4
      src/components/Drawer/index.js
  3. 31
      src/views/Auth/SignUp/index.js
  4. 19
      src/views/Home/Portrait/Public/Header/index.js
  5. 6
      src/views/Home/Portrait/Public/Responsive/index.js
  6. 2
      src/views/Home/Portrait/Public/index.js

@ -17,7 +17,7 @@ export default function Button({
}) { }) {
return ( return (
<button <button
className={`rounded-md flex py-3 justify-center text-base lg:text-tiny ${ className={`rounded-md flex py-3.5 justify-center text-base lg:text-tiny ${
disabled ? "cursor-not-allowed" : "cursor-pointer" disabled ? "cursor-not-allowed" : "cursor-pointer"
} font-bold lg:py-4 ${ } font-bold lg:py-4 ${
selectable ? (active ? "bg-black" : backgroundColor) : backgroundColor selectable ? (active ? "bg-black" : backgroundColor) : backgroundColor

@ -53,10 +53,10 @@ const MyDrawer = ({
onClick={() => changeDarkMode(!isDark)} onClick={() => changeDarkMode(!isDark)}
/> />
</div> </div>
<div className="flex flex-row justify-between px-2 pb-3"> <div className="flex flex-row justify-between px-2 pb-3 mt-1">
<div className="flex flex-col"> <div className="flex flex-col">
<strong className="text-lg text-white"> <strong className="text-lg text-white">
{user?.firstName + " " + user?.lastName} {user && user?.firstName + " " + user?.lastName}
</strong> </strong>
<span className="text-xs mt-2 text-gray-100 dark:text-grayDB"> <span className="text-xs mt-2 text-gray-100 dark:text-grayDB">
{user?.cellphone} {user?.cellphone}

@ -4,7 +4,8 @@ import Input from "../../../components/Input";
import Button from "../../../components/Button"; import Button from "../../../components/Button";
import Timer from "../../../components/Timer"; import Timer from "../../../components/Timer";
import onInput from "../../../utils/onInput"; import onInput from "../../../utils/onInput";
import { Link } from "react-router-dom"; import Loading from "../../../components/Loading";
import { connect } from "react-redux"; import { connect } from "react-redux";
import { user, publicApi } from "../../../redux/actions"; import { user, publicApi } from "../../../redux/actions";
@ -19,9 +20,10 @@ function SignUp({
theme, theme,
headerOptions, headerOptions,
setHeaderOptions, setHeaderOptions,
loading,
}) { }) {
const [level, setLevel] = useState("phonenumber"); const [level, setLevel] = useState("phonenumber");
const [signUpFields, setSignUpFiels] = useState({}); const [signUpFields, setSignUpFiels] = useState({});
const [error, setError] = useState(""); const [error, setError] = useState("");
const [resend, setResend] = useState(false); const [resend, setResend] = useState(false);
const navigate = useNavigate(); const navigate = useNavigate();
@ -195,7 +197,7 @@ function SignUp({
inputMode="numeric" inputMode="numeric"
style={{ direction: "ltr" }} style={{ direction: "ltr" }}
name="otp1" name="otp1"
className="bg-grayF9 outline-none rounded-md p-4 w-16 text-sm lg:text-lg text-center text-blueC0 mx-1" className="bg-grayF9 dark:bg-opacity-10 outline-none rounded-md p-4 w-16 text-2xl font-bold lg:text-lg text-center text-blueC0 mx-1"
onChange={(e) => onChange={(e) =>
onChange( onChange(
e.target.name, e.target.name,
@ -209,7 +211,7 @@ function SignUp({
inputMode="numeric" inputMode="numeric"
style={{ direction: "ltr" }} style={{ direction: "ltr" }}
name="otp2" name="otp2"
className="bg-grayF9 outline-none rounded-md p-4 w-16 text-sm lg:text-lg text-center text-blueC0 mx-1" className="bg-grayF9 dark:bg-opacity-10 outline-none rounded-md p-4 w-16 text-2xl font-bold lg:text-lg text-center text-blueC0 mx-1"
onChange={(e) => onChange={(e) =>
onChange( onChange(
e.target.name, e.target.name,
@ -223,7 +225,7 @@ function SignUp({
inputMode="numeric" inputMode="numeric"
style={{ direction: "ltr" }} style={{ direction: "ltr" }}
name="otp3" name="otp3"
className="bg-grayF9 outline-none rounded-md p-4 w-16 text-sm lg:text-lg text-center text-blueC0 mx-1" className="bg-grayF9 dark:bg-opacity-10 outline-none rounded-md p-4 w-16 text-2xl font-bold lg:text-lg text-center text-blueC0 mx-1"
onChange={(e) => onChange={(e) =>
onChange( onChange(
e.target.name, e.target.name,
@ -237,11 +239,13 @@ function SignUp({
inputMode="numeric" inputMode="numeric"
style={{ direction: "ltr" }} style={{ direction: "ltr" }}
name="otp4" name="otp4"
className="bg-grayF9 outline-none rounded-md p-4 w-16 text-sm lg:text-lg text-center text-blueC0 mx-1" className="bg-grayF9 dark:bg-opacity-10 outline-none rounded-md p-4 w-16 text-2xl font-bold lg:text-lg text-center text-blueC0 mx-1"
onChange={(e) => onChange={(e) =>
onChange( onChange(
e.target.name, e.target.name,
(e.target.value = onInput.englishAndNumberWithoutSpace(e.target.value)) (e.target.value = onInput.englishAndNumberWithoutSpace(
e.target.value
))
) )
} }
maxlength="1" maxlength="1"
@ -250,7 +254,8 @@ function SignUp({
</div> </div>
<br /> <br />
<Button <Button
title="ادامه فرایند خرید" title="ثبت نام"
loading={loading}
backgroundColor="bg-blueC0" backgroundColor="bg-blueC0"
border={{ color: "#196EC055", width: "0px" }} border={{ color: "#196EC055", width: "0px" }}
width="100%" width="100%"
@ -260,7 +265,7 @@ function SignUp({
} }
/> />
<div className="mt-10 flex flex-row text-center w-full justify-center"> <div className="mt-10 flex flex-row text-center w-full justify-center">
<div className="text-xs text-gray1 lg:text-sm"> <div className="text-xs text-gray1 dark:text-gray-200 lg:text-sm">
شماره خود را اشتباه وارد کردید؟{" "} شماره خود را اشتباه وارد کردید؟{" "}
<button <button
className="bg-transparent border-none text-greenBA font-medium" className="bg-transparent border-none text-greenBA font-medium"
@ -277,7 +282,8 @@ function SignUp({
} }
const mapStateToProps = (state) => ({ const mapStateToProps = (state) => ({
loginFlag : state.user.status, loginFlag: state.user.status,
loading: state.user.loading,
}); });
const mapDispatchToProps = { const mapDispatchToProps = {
@ -286,7 +292,4 @@ const mapDispatchToProps = {
setHeaderOptions: publicApi.setHeaderOptions, setHeaderOptions: publicApi.setHeaderOptions,
}; };
export default connect( export default connect(mapStateToProps, mapDispatchToProps)(SignUp);
mapStateToProps,
mapDispatchToProps
)(SignUp);

@ -4,7 +4,7 @@ import { Carousel } from "@trendyol-js/react-carousel";
import Book from "../../../Landscape/Page1/Book"; import Book from "../../../Landscape/Page1/Book";
import Lights from "../../../Landscape/Page1/Lights"; import Lights from "../../../Landscape/Page1/Lights";
import Video from "../../../../../components/JolPlayer"; import Video from "../../../../../components/JolPlayer";
import arrow from "../../../../../assets/icons/slider-arrow.svg"; import arrow from "../../../../../assets/icons/dropdown-blue.svg";
import olum1Image from "../../../../../assets/images/olum-1.svg"; import olum1Image from "../../../../../assets/images/olum-1.svg";
import olum2Image from "../../../../../assets/images/olum-2.svg"; import olum2Image from "../../../../../assets/images/olum-2.svg";
import olum4Image from "../../../../../assets/images/olum-4.svg"; import olum4Image from "../../../../../assets/images/olum-4.svg";
@ -38,18 +38,19 @@ function Header({ list }) {
show={show} show={show}
slide={1} slide={1}
swiping={true} swiping={true}
swipeOn={0.05}
// useArrowKeys={true} // useArrowKeys={true}
transition={0.5} transition={0.5}
rightArrow={ rightArrow={
<img <img
className="absolute top-1/2 transform -translate-y-1/2 cursor-pointer" className="w-5 absolute top-1/2 transform -translate-y-1/2 cursor-pointer -rotate-90"
src={arrow} src={arrow}
alt="" alt=""
/> />
} }
leftArrow={ leftArrow={
<img <img
className="absolute top-1/2 transform -translate-y-1/2 -translate-x-5 cursor-pointer -rotate-180" className="w-5 absolute top-1/2 transform -translate-y-1/2 -translate-x-5 cursor-pointer rotate-90"
src={arrow} src={arrow}
alt="" alt=""
/> />
@ -70,24 +71,24 @@ function Header({ list }) {
ورود به فروشگاه ورود به فروشگاه
</Link> </Link>
</div> </div>
<div className="flex flex-col items-center text-center font-extrabold text-blue5F dark:text-white text-2xl mt-3 transform translate-y-4"> <div className="flex flex-col items-center text-center font-extrabold text-blue5F dark:text-gray-300 text-2xl mt-3 transform translate-y-4">
<div className="flex flex-row"> <div className="flex flex-row">
<div className="relative"> <div className="relative">
<h1 className="inline z-50 pb-1">یادگیری &nbsp;</h1> <h1 className="inline z-20 pb-1">یادگیری &nbsp;</h1>
<span className="h-1 w-full absolute bottom-0 left-0 bg-yellow3"></span> <span className="h-1 w-full absolute bottom-0 z-10 left-0 bg-yellow3"></span>
</div> </div>
<h1 className="inline">با طعم لذت</h1> <h1 className="inline">با طعم لذت</h1>
</div> </div>
<div className="flex flex-row mt-0.5"> <div className="flex flex-row my-1.5">
<h1 className="inline">از اول تا یازدهم &nbsp;</h1> <h1 className="inline">از اول تا یازدهم &nbsp;</h1>
<div className="relative"> <div className="relative">
<h1 className="inline z-50 pb-1">کنارتونیم</h1> <h1 className="inline z-20 pb-1">کنارتونیم</h1>
<span className="h-1 w-full absolute bottom-0 left-0 bg-orange1"></span> <span className="h-1 w-full absolute bottom-0 left-0 bg-orange1"></span>
</div> </div>
</div> </div>
<div className="flex flex-row"> <div className="flex flex-row">
<div className="relative"> <div className="relative">
<h1 className="inline z-50 pb-1">یادگیری جذاب &nbsp;</h1> <h1 className="inline z-20 pb-1">یادگیری جذاب &nbsp;</h1>
<span className="h-1 w-full absolute bottom-0 left-0 bg-green1"></span> <span className="h-1 w-full absolute bottom-0 left-0 bg-green1"></span>
</div> </div>
<h1 className="inline">و تعاملی</h1> <h1 className="inline">و تعاملی</h1>

@ -12,13 +12,13 @@ function Responsive() {
}} }}
> >
<div className="flex flex-col items-center text-center font-extrabold text-blue5F text-lg mt-3 transform translate-y-4"> <div className="flex flex-col items-center text-center font-extrabold text-blue5F dark:text-gray-300 text-lg mt-3 transform translate-y-4">
<div className="flex flex-row "> <div className="flex flex-row ">
<h1 className="inline z-50"> <h1 className="inline z-50">
از طریق موبایل یا کامپیوتر میتونی از طریق موبایل یا کامپیوتر میتونی
</h1> </h1>
</div> </div>
<div className="flex flex-row"> <div className="flex flex-row my-1.5">
<div className="relative"> <div className="relative">
<h1 className="inline z-50 pb-1">به محتوای دیجیتال &nbsp;</h1> <h1 className="inline z-50 pb-1">به محتوای دیجیتال &nbsp;</h1>
<span className="h-1 w-full absolute bottom-0 left-0 bg-green1"></span> <span className="h-1 w-full absolute bottom-0 left-0 bg-green1"></span>
@ -33,7 +33,7 @@ function Responsive() {
<div className="absolute left-0 bottom-0 rounded-md bg-grayE3" style={{ height : 'calc(100vh / 4)', width : 'calc(100vw / 1.2)' }}> <div className="absolute left-0 bottom-0 rounded-md bg-grayE3" style={{ height : 'calc(100vh / 4)', width : 'calc(100vw / 1.2)' }}>
</div> </div>
<div className="absolute right-0 bottom-0 rounded-md bg-grayEE" style={{ height : 'calc(100vh / 6.2)', width : 'calc(100vw / 6)' }}> <div className="absolute right-0 bottom-0 rounded-md bg-gray-300" style={{ height : 'calc(100vh / 6.2)', width : 'calc(100vw / 6)' }}>
</div> </div>
</div> </div>

@ -8,7 +8,7 @@ import GradiantText from './GradiantText';
function Public() { function Public() {
return ( return (
<div className="w-full flex-1 px-2 pt-2 pb-6"> <div className="w-full flex-1 px-4 pt-2 pb-24">
<Header /> <Header />
<Features /> <Features />
<Responsive /> <Responsive />

Loading…
Cancel
Save