Mobile Version Done

main
Pedram Keshavarzi 3 years ago
parent 213da8d54a
commit 624267ac0f
  1. 6
      src/App.js
  2. 20
      src/view/services/index.js

@ -669,6 +669,12 @@ function App() {
{LOGIN && <Header logOut={logOut} />} {LOGIN && <Header logOut={logOut} />}
{LOGIN && <Nav logOut={logOut} />} {LOGIN && <Nav logOut={logOut} />}
<Routes> <Routes>
<Route path='/' element={window.innerWidth <= 1024 && <Dashboard
ActiveUserFullInfo={ActiveUserFullInfo}
UserFullInfoData={UserFullInfoData}
showUserFullInfo={showUserFullInfo}
hideUserFullInfo={hideUserFullInfo}
/>} />
<Route path="/myServices" element={LOGIN ? <Route path="/myServices" element={LOGIN ?
<Dashboard <Dashboard
ActiveUserFullInfo={ActiveUserFullInfo} ActiveUserFullInfo={ActiveUserFullInfo}

@ -493,19 +493,16 @@ const Services = ({
<div <div
className={`flex w-32 border-2 p-2 mx-2 justify-center items-center rounded-md cursor-pointer className={`flex w-32 border-2 p-2 mx-2 justify-center items-center rounded-md cursor-pointer
hover:border-red52 hover:text-red52 hover:bg-pinkF5 hover:border-red52 hover:text-red52 hover:bg-pinkF5
${filterCheck[0] ${filterCheck == ''
? "border-red52 text-red52 bg-pinkF5" ? "border-red52 text-red52 bg-pinkF5"
: "border-gray200 text-gray-400" : "border-gray200 text-gray-400"
}`} }`}
onClick={(prevState) => onClick={(prevState) =>
setFilterCheck([ setFilterCheck('')
...prevState,
(filterCheck[0] = !filterCheck[0]),
])
} }
> >
<h3>آنلاین</h3> <h3>آنلاین</h3>
{filterCheck[0] && ( {filterCheck == '' && (
<div className="flex w-full" style={{ direction: "ltr" }}> <div className="flex w-full" style={{ direction: "ltr" }}>
<div className="w-4 h-4 text-white text-sm rounded-full flex justify-center items-center bg-red52"> <div className="w-4 h-4 text-white text-sm rounded-full flex justify-center items-center bg-red52">
<svg <svg
@ -532,19 +529,16 @@ const Services = ({
<div <div
className={`flex w-32 border-2 p-2 mx-2 justify-center items-center rounded-md cursor-pointer className={`flex w-32 border-2 p-2 mx-2 justify-center items-center rounded-md cursor-pointer
hover:border-red52 hover:text-red52 hover:bg-pinkF5 hover:border-red52 hover:text-red52 hover:bg-pinkF5
${filterCheck[1] ${filterCheck == ''
? "border-red52 text-red52 bg-pinkF5" ? "border-red52 text-red52 bg-pinkF5"
: "border-gray200 text-gray-400" : "border-gray200 text-gray-400"
}`} }`}
onClick={(prevState) => onClick={(prevState) =>
setFilterCheck([ setFilterCheck('')
...prevState,
(filterCheck[0] = !filterCheck[0]),
])
} }
> >
<h3>حضوری</h3> <h3>حضوری</h3>
{filterCheck[0] && ( {filterCheck == '' && (
<div className="flex w-full" style={{ direction: "ltr" }}> <div className="flex w-full" style={{ direction: "ltr" }}>
<div className="w-4 h-4 text-white text-sm rounded-full flex justify-center items-center bg-red52"> <div className="w-4 h-4 text-white text-sm rounded-full flex justify-center items-center bg-red52">
<svg <svg
@ -628,7 +622,7 @@ const Services = ({
index={Number(index)} index={Number(index)}
productName={`${product?.name}`} productName={`${product?.name}`}
productCat={`پایه ${grades[product?.gradeId]}`} productCat={`پایه ${grades[product?.gradeId]}`}
productPrice={product.product[0].price} productPrice={product?.price}
// productImg={"https://dnvn.ir/api/v1/file/" + product?.fileIds} // productImg={"https://dnvn.ir/api/v1/file/" + product?.fileIds}
numberOfRegards={160} numberOfRegards={160}
productHolderBorder="" productHolderBorder=""

Loading…
Cancel
Save