update src/views/Address/index.js, Main.js and Pagination.js

master
Reza_ashrafi 2 years ago
parent e26ec81204
commit 9993d1f94f
  1. 12
      src/views/Address/index.js
  2. 6
      src/views/Products/layouts/Desktop/Main.js
  3. 4
      src/views/Products/layouts/Desktop/Pagination.js

@ -301,7 +301,7 @@ export const Address = ({
return ( return (
<div <div
className={`flex flex-col lg:flex-row-reverse px-4 flex-1 lg:pt-0 pb-20 gap-5 lg:divide-x lg:divide-solid lg:divide-gray-200 ${ className={`flex flex-col lg:flex-row-reverse px-4 flex-1 lg:pt-0 pb-20 gap-5 lg:divide-x lg:divide-solid lg:divide-gray-200 ${
location?.state?.panel === isMobile ? "mt-2" : "mt-32 px-10" location?.state?.panel === isMobile ? "mt-2" : "lg:mt-32 lg:px-10"
} `} } `}
// style={{ minHeight: "calc(100vh - 500px)" }} // style={{ minHeight: "calc(100vh - 500px)" }}
> >
@ -410,7 +410,7 @@ export const Address = ({
)} )}
/> />
<div className="flex flex-col lg:items-center lg:gap-5 w-full mb-4"> <div className="flex flex-col lg:items-center lg:flex-row lg:gap-5 w-full mb-4">
<Input <Input
width={isMobile ? "100%" : "50%"} width={isMobile ? "100%" : "50%"}
label={window.t("نام")} label={window.t("نام")}
@ -457,7 +457,7 @@ export const Address = ({
)} )}
/> />
<div className="flex flex-col lg:items-center lg:gap-5 w-full mb-4"> <div className="flex flex-col lg:flex-row lg:items-center lg:gap-5 w-full mb-4">
<Input <Input
width={isMobile ? "100%" : "50%"} width={isMobile ? "100%" : "50%"}
label={window.t("شماره موبایل")} label={window.t("شماره موبایل")}
@ -526,7 +526,7 @@ export const Address = ({
)} )}
/> />
<div className="flex flex-col lg:items-center gap-3 lg:gap-5 w-full"> <div className="flex flex-col lg:mb-2 lg:flex-row lg:items-center gap-3 lg:gap-5 w-full">
<Select <Select
selectProvince={"استان"} selectProvince={"استان"}
options={provinces.map((e) => ({ value: e.id, name: e.name }))} options={provinces.map((e) => ({ value: e.id, name: e.name }))}
@ -585,6 +585,7 @@ export const Address = ({
</div> </div>
)} )}
</div> </div>
<div className="flex flex-col lg:mb-1 lg:flex-row lg:items-center gap-3 lg:gap-5 w-full">
<Input <Input
width={isMobile ? "100%" : "50%"} width={isMobile ? "100%" : "50%"}
label={window.t("کد پستی")} label={window.t("کد پستی")}
@ -604,6 +605,9 @@ export const Address = ({
direction="ltr" direction="ltr"
maxLength={10} maxLength={10}
/> />
<div className="lg:w-1/2"></div>
</div>
<div <div
className={`flex ${ className={`flex ${
profilePage ? "mt-10" : "lg:hidden" profilePage ? "mt-10" : "lg:hidden"

@ -266,8 +266,10 @@ export const Main = ({
<div className="w-full flex justify-center gap-x-2"> <div className="w-full flex justify-center gap-x-2">
{pages.map((e) => ( {pages.map((e) => (
<div <div
className={`w-8 p-2 text-sm text-center rounded-md text-green7B cursor-pointer transform translate ${ className={`w-8 p-2 text-sm text-center rounded-md cursor-pointer transform translate ${
page === true ? "bg-red-400" : "bg-blue-600" page === e
? "bg-green-600 text-white"
: "border border-solid border-green-600 text-green-600"
}`} }`}
onClick={() => setPage(e)} onClick={() => setPage(e)}
> >

@ -13,9 +13,9 @@ const Pagination = ({ postsPerPage, totalPosts, paginate }) => {
{pageNumbers.map((number) => ( {pageNumbers.map((number) => (
<li <li
key={number} key={number}
className="border border-blue-400 bg-blue-200 rounded-sm px-2 py-1" className="border border-blue-400 bg-blue-200 rounded-sm px-2 py-1 text-white"
> >
<p onClick={() => paginate(number)} className=""> <p onClick={() => paginate(number)} className="text-white">
{number} {number}
</p> </p>
</li> </li>

Loading…
Cancel
Save