Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 10189a89c4 |
@@ -69,7 +69,6 @@ import FamilyActivitiesPage from "./views/FamilyActivitiesPage";
|
|||||||
import FamGamesPage from "./views/FamGamesPage";
|
import FamGamesPage from "./views/FamGamesPage";
|
||||||
import FamilyRoutesPage from "./views/FamilyRoutesPage";
|
import FamilyRoutesPage from "./views/FamilyRoutesPage";
|
||||||
import PromoPage from "./views/PromoPage";
|
import PromoPage from "./views/PromoPage";
|
||||||
import LearnMorePage from "./views/LearnMorePage";
|
|
||||||
|
|
||||||
export default function Routers() {
|
export default function Routers() {
|
||||||
return (
|
return (
|
||||||
@@ -204,7 +203,6 @@ export default function Routers() {
|
|||||||
<Route exact path="/sell" element={<SellPage />} />
|
<Route exact path="/sell" element={<SellPage />} />
|
||||||
<Route exact path="/saved" element={<SavedPage />} />
|
<Route exact path="/saved" element={<SavedPage />} />
|
||||||
<Route exact path="/history" element={<HistoryPage />} />
|
<Route exact path="/history" element={<HistoryPage />} />
|
||||||
<Route exact path="/learnmore" element={<LearnMorePage />} />
|
|
||||||
{/*<Route exact path="/upload-product" element={<UploadProductPage />} />*/}
|
{/*<Route exact path="/upload-product" element={<UploadProductPage />} />*/}
|
||||||
<Route exact path="/my-uploads" element={<UploadProductPage />} />
|
<Route exact path="/my-uploads" element={<UploadProductPage />} />
|
||||||
<Route exact path="/profile" element={<AuthProfilePage />} />
|
<Route exact path="/profile" element={<AuthProfilePage />} />
|
||||||
|
|||||||
@@ -16,9 +16,6 @@ import { updateUserDetails } from "../../../store/UserDetails";
|
|||||||
|
|
||||||
import ReCAPTCHA from "react-google-recaptcha";
|
import ReCAPTCHA from "react-google-recaptcha";
|
||||||
|
|
||||||
import GoogleDownload from '../../../assets/images/download/andriod.jpg'
|
|
||||||
import IOSDownload from '../../../assets/images/download/apple.jpg'
|
|
||||||
|
|
||||||
export default function Login() {
|
export default function Login() {
|
||||||
// eslint-disable-next-line no-restricted-globals
|
// eslint-disable-next-line no-restricted-globals
|
||||||
const queryParams = new URLSearchParams(location?.search);
|
const queryParams = new URLSearchParams(location?.search);
|
||||||
@@ -529,43 +526,40 @@ export default function Login() {
|
|||||||
{/* APP DOWNLOAD STORE */}
|
{/* APP DOWNLOAD STORE */}
|
||||||
<div className="w-full mt-4">
|
<div className="w-full mt-4">
|
||||||
<div className="w-full flex justify-center items-center gap-4">
|
<div className="w-full flex justify-center items-center gap-4">
|
||||||
<div className="w-32 lg:w-48">
|
<div className="w-28 lg:w-32">
|
||||||
<a
|
<a
|
||||||
// className="px-1 py-1 lg:py-2 flex justify-center items-center gap-1 w-full rounded-md bg-black text-white hover:text-slate-500 hover:shadow-lg transition-all duration-300"
|
className="px-1 py-1 lg:py-2 flex justify-center items-center gap-1 w-full rounded-md bg-black text-white hover:text-slate-500 hover:shadow-lg transition-all duration-300"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noreferrer"
|
rel="noreferrer"
|
||||||
href={process.env.REACT_APP_APPLE_APP}
|
href={process.env.REACT_APP_APPLE_APP}
|
||||||
>
|
>
|
||||||
{/* <i className="fa-brands fa-apple text-3xl"></i>
|
<i className="fa-brands fa-apple text-3xl"></i>
|
||||||
<div className="flex flex-col">
|
<div className="flex flex-col">
|
||||||
<span className="text-[11px]">Available on the</span>
|
<span className="text-[11px]">Available on the</span>
|
||||||
<span className="text-[12px] lg:text-base">
|
<span className="text-[12px] lg:text-base">
|
||||||
App Store
|
App Store
|
||||||
</span>
|
</span>
|
||||||
</div> */}
|
</div>
|
||||||
<img src={IOSDownload} className='w-full h-auto' alt='IOS Download' />
|
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div className="w-32 lg:w-48">
|
<div className="w-28 lg:w-32">
|
||||||
<a
|
<a
|
||||||
// className="px-1 py-1 lg:py-2 flex justify-center items-center gap-1 w-full rounded-md bg-black text-white hover:text-slate-500 hover:shadow-lg transition-all duration-300"
|
className="px-1 py-1 lg:py-2 flex justify-center items-center gap-1 w-full rounded-md bg-black text-white hover:text-slate-500 hover:shadow-lg transition-all duration-300"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noreferrer"
|
rel="noreferrer"
|
||||||
href={process.env.REACT_APP_ANDROID_APP}
|
href={process.env.REACT_APP_ANDROID_APP}
|
||||||
>
|
>
|
||||||
{/* <i className="fa-brands fa-google-play text-2xl"></i>
|
<i className="fa-brands fa-google-play text-2xl"></i>
|
||||||
<div className="flex flex-col">
|
<div className="flex flex-col">
|
||||||
<span className="text-[11px]">Available on the</span>
|
<span className="text-[11px]">Available on the</span>
|
||||||
<span className="text-[12px] lg:text-base">
|
<span className="text-[12px] lg:text-base">
|
||||||
Google Play
|
Google Play
|
||||||
</span>
|
</span>
|
||||||
</div> */}
|
</div>
|
||||||
<img src={GoogleDownload} className='w-full h-auto' alt='IOS Download' />
|
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{loginType == "full" && (
|
{loginType == "full" && (
|
||||||
<>
|
<>
|
||||||
<div className="pt-5 text-[#181c32] text-center font-semibold text-[13.975px] leading-[20.9625px]">
|
<div className="pt-5 text-[#181c32] text-center font-semibold text-[13.975px] leading-[20.9625px]">
|
||||||
|
|||||||
@@ -179,10 +179,10 @@ export default function Promo() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* APP DOWNLOAD STORE */}
|
{/* APP DOWNLOAD STORE */}
|
||||||
<div className="w-full mt-4">
|
<div className="w-full mt-4">
|
||||||
<div className="w-full flex justify-center items-center gap-4">
|
<div className="w-full flex justify-between items-center gap-10 sm:gap-32">
|
||||||
<div className="w-32 lg:w-48">
|
<div className="w-full">
|
||||||
<a
|
<a
|
||||||
// className="px-1 py-1 lg:py-2 flex justify-center items-center gap-1 w-full rounded-md bg-black text-white hover:text-slate-500 hover:shadow-lg transition-all duration-300"
|
// className="px-1 py-1 lg:py-2 flex justify-center items-center gap-1 w-full rounded-md bg-black text-white hover:text-slate-500 hover:shadow-lg transition-all duration-300"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
@@ -199,7 +199,7 @@ export default function Promo() {
|
|||||||
<img src={IOSDownload} className='w-full h-auto' alt='IOS Download' />
|
<img src={IOSDownload} className='w-full h-auto' alt='IOS Download' />
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div className="w-32 lg:w-48">
|
<div className="w-full">
|
||||||
<a
|
<a
|
||||||
// className="px-1 py-1 lg:py-2 flex justify-center items-center gap-1 w-full rounded-md bg-black text-white hover:text-slate-500 hover:shadow-lg transition-all duration-300"
|
// className="px-1 py-1 lg:py-2 flex justify-center items-center gap-1 w-full rounded-md bg-black text-white hover:text-slate-500 hover:shadow-lg transition-all duration-300"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
|
|||||||
@@ -5,9 +5,6 @@ import usersService from "../../../services/UsersService";
|
|||||||
import InputCom from "../../Helpers/Inputs/InputCom";
|
import InputCom from "../../Helpers/Inputs/InputCom";
|
||||||
import AuthLayout from "../AuthLayout2";
|
import AuthLayout from "../AuthLayout2";
|
||||||
|
|
||||||
import GoogleDownload from '../../../assets/images/download/andriod.jpg'
|
|
||||||
import IOSDownload from '../../../assets/images/download/apple.jpg'
|
|
||||||
|
|
||||||
export default function SignUp() {
|
export default function SignUp() {
|
||||||
// eslint-disable-next-line no-restricted-globals
|
// eslint-disable-next-line no-restricted-globals
|
||||||
const queryParams = new URLSearchParams(location?.search);
|
const queryParams = new URLSearchParams(location?.search);
|
||||||
@@ -350,38 +347,36 @@ export default function SignUp() {
|
|||||||
{/* APP DOWNLOAD STORE */}
|
{/* APP DOWNLOAD STORE */}
|
||||||
<div className="w-full mt-4">
|
<div className="w-full mt-4">
|
||||||
<div className="w-full flex justify-center items-center gap-4">
|
<div className="w-full flex justify-center items-center gap-4">
|
||||||
<div className="w-32 lg:w-48">
|
<div className="w-28 lg:w-32">
|
||||||
<a
|
<a
|
||||||
// className="px-1 py-1 lg:py-2 flex justify-center items-center gap-1 w-full rounded-md bg-black text-white hover:text-slate-500 hover:shadow-lg transition-all duration-300"
|
className="px-1 py-1 lg:py-2 flex justify-center items-center gap-1 w-full rounded-md bg-black text-white hover:text-slate-500 hover:shadow-lg transition-all duration-300"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noreferrer"
|
|
||||||
href={process.env.REACT_APP_APPLE_APP}
|
href={process.env.REACT_APP_APPLE_APP}
|
||||||
|
rel="noreferrer"
|
||||||
>
|
>
|
||||||
{/* <i className="fa-brands fa-apple text-3xl"></i>
|
<i className="fa-brands fa-apple text-3xl"></i>
|
||||||
<div className="flex flex-col">
|
<div className="flex flex-col">
|
||||||
<span className="text-[11px]">Available on the</span>
|
<span className="text-[11px]">Available on the</span>
|
||||||
<span className="text-[12px] lg:text-base">
|
<span className="text-[12px] lg:text-base">
|
||||||
App Store
|
App Store
|
||||||
</span>
|
</span>
|
||||||
</div> */}
|
</div>
|
||||||
<img src={IOSDownload} className='w-full h-auto' alt='IOS Download' />
|
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div className="w-32 lg:w-48">
|
<div className="w-28 lg:w-32">
|
||||||
<a
|
<a
|
||||||
// className="px-1 py-1 lg:py-2 flex justify-center items-center gap-1 w-full rounded-md bg-black text-white hover:text-slate-500 hover:shadow-lg transition-all duration-300"
|
className="px-1 py-1 lg:py-2 flex justify-center items-center gap-1 w-full rounded-md bg-black text-white hover:text-slate-500 hover:shadow-lg transition-all duration-300"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noreferrer"
|
|
||||||
href={process.env.REACT_APP_ANDROID_APP}
|
href={process.env.REACT_APP_ANDROID_APP}
|
||||||
|
rel="noreferrer"
|
||||||
>
|
>
|
||||||
{/* <i className="fa-brands fa-google-play text-2xl"></i>
|
<i className="fa-brands fa-google-play text-2xl"></i>
|
||||||
<div className="flex flex-col">
|
<div className="flex flex-col">
|
||||||
<span className="text-[11px]">Available on the</span>
|
<span className="text-[11px]">Available on the</span>
|
||||||
<span className="text-[12px] lg:text-base">
|
<span className="text-[12px] lg:text-base">
|
||||||
Google Play
|
Google Play
|
||||||
</span>
|
</span>
|
||||||
</div> */}
|
</div>
|
||||||
<img src={GoogleDownload} className='w-full h-auto' alt='IOS Download' />
|
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ export default function OfferCard({
|
|||||||
let image = `${image_server}${localStorage.getItem("session_token")}/job/${datas.job_uid}`
|
let image = `${image_server}${localStorage.getItem("session_token")}/job/${datas.job_uid}`
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="card-style-one flex flex-col gap-3 justify-between w-full bg-white dark:bg-dark-white p-3 rounded-2xl">
|
<div className="card-style-one flex flex-col justify-between w-full h-[387px] bg-white dark:bg-dark-white p-3 pb rounded-2xl">
|
||||||
<div className="content">
|
<div className="content">
|
||||||
<div className="w-full h-40">
|
<div className="w-full h-40">
|
||||||
{/* thumbnail image/video */}
|
{/* thumbnail image/video */}
|
||||||
@@ -46,24 +46,24 @@ export default function OfferCard({
|
|||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
<div className="w-full p-2 rounded-lg border border-[#E3E4FE] dark:border-[#a7a9b533] ">
|
<div className="w-full p-2 rounded-lg border border-[#E3E4FE] dark:border-[#a7a9b533] ">
|
||||||
{/* <div className="grid grid-cols-1 gap-2">
|
<div className="grid grid-cols-1 gap-2">
|
||||||
<div className="flex flex-col justify-between items-center border-r-2">
|
{/* <div className="flex flex-col justify-between items-center border-r-2">
|
||||||
<p className="text-sm text-thin-light-gray dark:text-white tracking-wide">
|
<p className="text-sm text-thin-light-gray dark:text-white tracking-wide">
|
||||||
Task Code
|
Task Code
|
||||||
</p>
|
</p>
|
||||||
<p className="text-base font-bold tracking-wide text-dark-gray dark:text-white">
|
<p className="text-base font-bold tracking-wide text-dark-gray dark:text-white">
|
||||||
{datas.contract}
|
{datas.contract}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div> */}
|
||||||
<div className="flex flex-col justify-between items-center">
|
<div className="flex flex-col justify-between items-center">
|
||||||
<p className="text-sm text-red-500 tracking-wide">Expires</p>
|
<p className="text-sm text-red-500 tracking-wide">Expires</p>
|
||||||
<p className="text-base font-bold tracking-wide text-dark-gray dark:text-white">
|
<p className="text-base font-bold tracking-wide text-dark-gray dark:text-white">
|
||||||
<CountDown lastDate={datas.expire} />
|
<CountDown lastDate={datas.expire} />
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div> */}
|
</div>
|
||||||
|
|
||||||
{/* <hr className="my-2" /> */}
|
<hr className="my-2" />
|
||||||
|
|
||||||
<div className="grid grid-cols-2 gap-2">
|
<div className="grid grid-cols-2 gap-2">
|
||||||
<div className="flex flex-col justify-between items-center border-r-2">
|
<div className="flex flex-col justify-between items-center border-r-2">
|
||||||
@@ -74,19 +74,13 @@ export default function OfferCard({
|
|||||||
{thePrice}
|
{thePrice}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
{/* <div className="flex flex-col justify-between items-center">
|
<div className="flex flex-col justify-between items-center">
|
||||||
<p className="text-sm text-thin-light-gray dark:text-white tracking-wide">
|
<p className="text-sm text-thin-light-gray dark:text-white tracking-wide">
|
||||||
Timeline
|
Timeline
|
||||||
</p>
|
</p>
|
||||||
<p className="text-base font-bold tracking-wide text-dark-gray dark:text-white">
|
<p className="text-base font-bold tracking-wide text-dark-gray dark:text-white">
|
||||||
{`${datas.timeline_days} day(s)`}
|
{`${datas.timeline_days} day(s)`}
|
||||||
</p>
|
</p>
|
||||||
</div> */}
|
|
||||||
<div className="flex flex-col justify-between items-center">
|
|
||||||
<p className="text-sm text-red-500 tracking-wide">Expires</p>
|
|
||||||
<p className="text-base font-bold tracking-wide text-dark-gray dark:text-white">
|
|
||||||
<CountDown lastDate={datas.expire} />
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -85,7 +85,6 @@ export default function SocketIOContextProvider({children}) {
|
|||||||
}
|
}
|
||||||
console.log('data', data)
|
console.log('data', data)
|
||||||
});
|
});
|
||||||
// dispatch(tableReload({ type: "HOMEBANNERS" })); // RELOADS HOME BANNERS
|
|
||||||
|
|
||||||
}, [socket]);
|
}, [socket]);
|
||||||
|
|
||||||
|
|||||||
@@ -5,15 +5,13 @@ import OfferJobPopout from '../../components/jobPopout/OfferJobPopout'
|
|||||||
import { PriceFormatter } from "../Helpers/PriceFormatter";
|
import { PriceFormatter } from "../Helpers/PriceFormatter";
|
||||||
import CountDown from '../Helpers/CountDown'
|
import CountDown from '../Helpers/CountDown'
|
||||||
|
|
||||||
const AccountDashboard = ({ className, bannerList, offersList, imageServer }) => {
|
const AccountDashboard = ({ className, bannerList, offersList }) => {
|
||||||
|
|
||||||
let [offerPopout, setOfferPopout] = useState({ show: false, data: {} }); // STATE TO HOLD THE VALUE OF THE ALERT DETAILS AND DETERMINE WHEN TO SHOW
|
let [offerPopout, setOfferPopout] = useState({ show: false, data: {} }); // STATE TO HOLD THE VALUE OF THE ALERT DETAILS AND DETERMINE WHEN TO SHOW
|
||||||
|
|
||||||
let offersListLength = offersList?.length > 2 ? 2 : offersList?.length
|
|
||||||
|
|
||||||
// getting the upper three banners for the home layout
|
// getting the upper three banners for the home layout
|
||||||
const getUpperBanner = bannerList?.filter((value, idx) => idx <= 2 - offersListLength);
|
const getUpperBanner = bannerList?.filter((value, idx) => idx <= 2);
|
||||||
const getLowerBanner = bannerList?.filter((value, idx) => !getUpperBanner?.map(item => item?.title)?.includes(value.title));
|
const getLowerBanner = bannerList?.filter((value, idx) => idx > 2);
|
||||||
|
|
||||||
let getImage = ({ banner_location, banner }) => {
|
let getImage = ({ banner_location, banner }) => {
|
||||||
if (banner_location == "LOCAL") {
|
if (banner_location == "LOCAL") {
|
||||||
@@ -31,26 +29,24 @@ const AccountDashboard = ({ className, bannerList, offersList, imageServer }) =>
|
|||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
|
|
||||||
{/* for normal banner section */}
|
|
||||||
<div className="w-full grid xxs:grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 items-center justify-center gap-2 md:gap-4">
|
<div className="w-full grid xxs:grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 items-center justify-center gap-2 md:gap-4">
|
||||||
|
|
||||||
{/* OFFER LIST DISPLAY */}
|
{/* OFFER LIST DISPLAY */}
|
||||||
<>
|
<>
|
||||||
{(offersList && offersList?.length > 0) &&
|
{(offersList && offersList?.result_list?.length > 0) &&
|
||||||
offersList.map((item, index) => {
|
offersList.result_list.map((item, index) => {
|
||||||
let thePrice = PriceFormatter(
|
let thePrice = PriceFormatter(
|
||||||
item?.price * 0.01,
|
item?.price * 0.01,
|
||||||
item?.currency_code,
|
item?.currency_code,
|
||||||
item?.currency
|
item?.currency
|
||||||
);
|
);
|
||||||
|
|
||||||
let image = `${imageServer}${localStorage.getItem("session_token")}/job/${item.job_uid}`
|
let image = `${offersList.session_image_server}${localStorage.getItem("session_token")}/job/${item.job_uid}`
|
||||||
if(index < offersListLength){
|
return (
|
||||||
return (
|
<div key={item.id}>
|
||||||
<div key={item.offer_uid}>
|
<NewOfferCard datas={item} image={image} price={thePrice} setOfferPopout={setOfferPopout} />
|
||||||
<NewOfferCard datas={item} image={image} price={thePrice} setOfferPopout={setOfferPopout} />
|
</div>
|
||||||
</div>
|
)
|
||||||
)
|
|
||||||
}
|
|
||||||
})}
|
})}
|
||||||
</>
|
</>
|
||||||
|
|
||||||
@@ -73,30 +69,7 @@ const AccountDashboard = ({ className, bannerList, offersList, imageServer }) =>
|
|||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
|
<div className="w-full grid-cols-1 md:grid-cols-2 2xl::grid-cols-3 grid items-center justify-center gap-2 md:gap-4">
|
||||||
|
|
||||||
{/* for flat banner section */}
|
|
||||||
<div className="w-full grid-cols-1 md:grid-cols-2 2xl:grid-cols-3 grid items-center justify-center gap-2 md:gap-4">
|
|
||||||
{/* OFFER LIST DISPLAY */}
|
|
||||||
{/* <>
|
|
||||||
{(offersList && offersList?.length > 0) &&
|
|
||||||
offersList.map((item, index) => {
|
|
||||||
let thePrice = PriceFormatter(
|
|
||||||
item?.price * 0.01,
|
|
||||||
item?.currency_code,
|
|
||||||
item?.currency
|
|
||||||
);
|
|
||||||
|
|
||||||
let image = `${imageServer}${localStorage.getItem("session_token")}/job/${item.job_uid}`
|
|
||||||
if(index >= 3) {
|
|
||||||
return(
|
|
||||||
<div key={item.offer_uid}>
|
|
||||||
<NewOfferCardFlat datas={item} image={image} price={thePrice} setOfferPopout={setOfferPopout} />
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
})}
|
|
||||||
</> */}
|
|
||||||
{getLowerBanner?.map((props, idx) => {
|
{getLowerBanner?.map((props, idx) => {
|
||||||
let image = getImage(props);
|
let image = getImage(props);
|
||||||
|
|
||||||
@@ -184,17 +157,10 @@ const NewOfferCard = ({ datas, hidden = false, price, setOfferPopout, image }) =
|
|||||||
:
|
:
|
||||||
<div
|
<div
|
||||||
className="thumbnail w-full h-full rounded-xl overflow-hidden px-4 pt-4"
|
className="thumbnail w-full h-full rounded-xl overflow-hidden px-4 pt-4"
|
||||||
style={{
|
|
||||||
// background: `url(${image}) center / contain no-repeat`,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{/* <img src={image} className='' /> */}
|
|
||||||
<div
|
|
||||||
className="thumbnail w-full h-full rounded-xl overflow-hidden"
|
|
||||||
style={{
|
style={{
|
||||||
background: `url(${image}) center / contain no-repeat`,
|
background: `url(${image}) center / contain no-repeat`,
|
||||||
}}
|
}}
|
||||||
></div>
|
>
|
||||||
{hidden && <div className="flex justify-center"></div>}
|
{hidden && <div className="flex justify-center"></div>}
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
@@ -204,15 +170,18 @@ const NewOfferCard = ({ datas, hidden = false, price, setOfferPopout, image }) =
|
|||||||
<h1 className="font-bold text-lg line-clamp-1 text-center">
|
<h1 className="font-bold text-lg line-clamp-1 text-center">
|
||||||
{datas?.title}
|
{datas?.title}
|
||||||
</h1>
|
</h1>
|
||||||
|
{/* <Link to={link_path} className="text-sm">
|
||||||
|
{desc}
|
||||||
|
</Link> */}
|
||||||
<div className="card-buttons flex justify-center items-center space-x-2">
|
<div className="card-buttons flex justify-center items-center space-x-2">
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
setOfferPopout({ show: true, data: { ...datas, image } })
|
setOfferPopout({ show: true, data: { ...datas, price, image } })
|
||||||
}
|
}
|
||||||
className="btn-shine w-2/3 h-[40px] text-white rounded-full text-sm bg-pink flex justify-center items-center"
|
className="btn-shine w-2/3 h-[40px] text-white rounded-full text-sm bg-pink flex justify-center items-center"
|
||||||
>
|
>
|
||||||
Start Now
|
Start Task
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -234,62 +203,6 @@ const NewOfferCard = ({ datas, hidden = false, price, setOfferPopout, image }) =
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const NewOfferCardFlat = ({ datas, hidden = false, price, setOfferPopout, image }) => {
|
|
||||||
return (
|
|
||||||
<div className="flex flex-col shadow-md bg-red-50 dark:bg-dark-white rounded-xl dark:border-[#5356fb29] overflow-hidden">
|
|
||||||
<div className="w-full xxs:flex justify-between items-center border-b border-slate-300 p-2">
|
|
||||||
<div className="min-h-[130px] sm:min-h-[100px] flex justify-between items-center">
|
|
||||||
<div className="px-2 flex flex-col gap-2 dark:text-white">
|
|
||||||
<h1 className="font-bold text-lg line-clamp-1 text-center">
|
|
||||||
{datas?.title}
|
|
||||||
</h1>
|
|
||||||
<div className="card-buttons flex items-center space-x-2">
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
onClick={() =>
|
|
||||||
setOfferPopout({ show: true, data: { ...datas, image } })
|
|
||||||
}
|
|
||||||
className="btn-shine w-28 h-[40px] text-white rounded-full text-sm bg-pink flex justify-center items-center"
|
|
||||||
>
|
|
||||||
Start Now
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className='w-[150px] h-[100px]'>
|
|
||||||
{datas.job_type == "MEDIA" ?
|
|
||||||
<Suspense fallback={<p>Loading...</p>}>
|
|
||||||
<VideoElement videoId={datas?.media_uid} />
|
|
||||||
</Suspense>
|
|
||||||
:
|
|
||||||
<div
|
|
||||||
className="thumbnail w-full h-full rounded-xl overflow-hidden px-4 pt-4"
|
|
||||||
style={{
|
|
||||||
background: `url(${image}) center / contain no-repeat`,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{hidden && <div className="flex justify-center"></div>}
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className="flex justify-between w-full p-1 items-center">
|
|
||||||
<div className="flex gap-1 items-center">
|
|
||||||
<p className="text-[12px] text-red-500 tracking-wide">Expires</p>
|
|
||||||
<p className="text-[12px] font-semibold tracking-wide text-dark-gray dark:text-white">
|
|
||||||
<CountDown lastDate={datas.expire} />
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<button className="flex items-center justify-center gap-2">
|
|
||||||
<div className="w-[4px] h-[4px] bg-slate-400 rounded-full"></div>
|
|
||||||
<div className="w-[4px] h-[4px] bg-slate-400 rounded-full"></div>
|
|
||||||
<div className="w-[4px] h-[4px] bg-slate-400 rounded-full"></div>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
const LowerBanner = ({ image, title = "", desc = "", btn, link_path, card_type, blog_id, key }) => {
|
const LowerBanner = ({ image, title = "", desc = "", btn, link_path, card_type, blog_id, key }) => {
|
||||||
const newLinkPath = card_type == 'BLOG' ? `${link_path}?blog_id=${blog_id}` : link_path
|
const newLinkPath = card_type == 'BLOG' ? `${link_path}?blog_id=${blog_id}` : link_path
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { useSelector } from "react-redux";
|
|||||||
export default function FamilyParentDashboard({
|
export default function FamilyParentDashboard({
|
||||||
className,
|
className,
|
||||||
bannerList,
|
bannerList,
|
||||||
|
nextDueTask,
|
||||||
}) {
|
}) {
|
||||||
const { userDetails } = useSelector((state) => state?.userDetails);
|
const { userDetails } = useSelector((state) => state?.userDetails);
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import React from "react";
|
|||||||
// import HomeSliders from "./HomeSliders";
|
// import HomeSliders from "./HomeSliders";
|
||||||
import { useSelector } from "react-redux";
|
import { useSelector } from "react-redux";
|
||||||
|
|
||||||
export default function HomeDashboard({ className, bannerList }) {
|
export default function HomeDashboard({ className, bannerList, nextDueTask }) {
|
||||||
const { userDetails } = useSelector((state) => state?.userDetails);
|
const { userDetails } = useSelector((state) => state?.userDetails);
|
||||||
|
|
||||||
let loginDate = userDetails?.last_login.split(" ")[0];
|
let loginDate = userDetails?.last_login.split(" ")[0];
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { useSelector } from "react-redux";
|
|||||||
export default function JobOwnerDashboard({
|
export default function JobOwnerDashboard({
|
||||||
className,
|
className,
|
||||||
bannerList,
|
bannerList,
|
||||||
|
nextDueTask,
|
||||||
}) {
|
}) {
|
||||||
const { userDetails } = useSelector((state) => state?.userDetails);
|
const { userDetails } = useSelector((state) => state?.userDetails);
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { useSelector } from "react-redux";
|
|||||||
export default function WorkerDashboard({
|
export default function WorkerDashboard({
|
||||||
className,
|
className,
|
||||||
bannerList,
|
bannerList,
|
||||||
|
nextDueTask,
|
||||||
}) {
|
}) {
|
||||||
const { userDetails } = useSelector((state) => state?.userDetails);
|
const { userDetails } = useSelector((state) => state?.userDetails);
|
||||||
|
|
||||||
|
|||||||
@@ -20,9 +20,6 @@ export default function FamilyTableNew() {
|
|||||||
|
|
||||||
let { pathname } = useLocation();
|
let { pathname } = useLocation();
|
||||||
|
|
||||||
const queryParams = new URLSearchParams(location?.search);
|
|
||||||
const preSelectedTab = queryParams.get("tab");
|
|
||||||
|
|
||||||
// Initial state for family details
|
// Initial state for family details
|
||||||
const initialDetailState = {
|
const initialDetailState = {
|
||||||
loading: false,
|
loading: false,
|
||||||
@@ -68,43 +65,35 @@ export default function FamilyTableNew() {
|
|||||||
|
|
||||||
// Function to handle tab changes
|
// Function to handle tab changes
|
||||||
const tabHandler = (value) => {
|
const tabHandler = (value) => {
|
||||||
setTab(value.toLowerCase());
|
setTab(value);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Object that maps tab names to their corresponding components
|
// Object that maps tab names to their corresponding components
|
||||||
const tabComponents = {
|
const tabComponents = {
|
||||||
tasks: (
|
Tasks: (
|
||||||
<FamilyTasks
|
<FamilyTasks
|
||||||
familyData={familyTasks}
|
familyData={familyTasks}
|
||||||
action={familyAssignPopUpHandler}
|
action={familyAssignPopUpHandler}
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
waiting: (
|
Waiting: (
|
||||||
<FamilyWaitlist
|
<FamilyWaitlist
|
||||||
familyData={familyWaitList}
|
familyData={familyWaitList}
|
||||||
setUpdatePage={setUpdatePage}
|
setUpdatePage={setUpdatePage}
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
pending: (
|
Pending: (
|
||||||
<FamilyPending
|
<FamilyPending
|
||||||
familyData={familyPending}
|
familyData={familyPending}
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
|
|
||||||
const defaultTabComponent = tabComponents.tasks;
|
const defaultTabComponent = tabComponents.Tasks;
|
||||||
|
|
||||||
// Selected tab component based on the current 'tab'
|
// Selected tab component based on the current 'tab'
|
||||||
const selectedTabComponent = tabComponents[tab] || defaultTabComponent;
|
const selectedTabComponent = tabComponents[tab] || defaultTabComponent;
|
||||||
|
|
||||||
useEffect(()=>{ // EFFECT TO CHECK FOR PRE SELECTED TAB AND DEFAULT TO IT OR TO DEFAULT IF NOT AVALIABLE
|
|
||||||
if(preSelectedTab && tabs.map(item => item.name.toLowerCase()).includes(preSelectedTab.toLowerCase())){
|
|
||||||
setTab(preSelectedTab)
|
|
||||||
}else{
|
|
||||||
setTab(tabs[0].name)
|
|
||||||
}
|
|
||||||
},[])
|
|
||||||
|
|
||||||
|
|
||||||
// Effect to manage active family task details
|
// Effect to manage active family task details
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -200,7 +189,7 @@ export default function FamilyTableNew() {
|
|||||||
<Suspense
|
<Suspense
|
||||||
fallback={
|
fallback={
|
||||||
<div className="h-full min-h-[609px] w-full overflow-hidden flex justify-center items-center">
|
<div className="h-full min-h-[609px] w-full overflow-hidden flex justify-center items-center">
|
||||||
<LoadingSpinner size="16" color="sky-blue" height='h-[30rem]' />
|
<LoadingSpinner size="16" color="sky-blue" />
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
@@ -213,7 +202,7 @@ export default function FamilyTableNew() {
|
|||||||
<li
|
<li
|
||||||
onClick={() => tabHandler(name)}
|
onClick={() => tabHandler(name)}
|
||||||
className={`p-4 flex hover:text-purple transition-all ease-in-out items-center cursor-pointer overflow-hidden text-xl relative top-[2px] ${
|
className={`p-4 flex hover:text-purple transition-all ease-in-out items-center cursor-pointer overflow-hidden text-xl relative top-[2px] ${
|
||||||
tab.toLowerCase() === name.toLowerCase()
|
tab === name
|
||||||
? "text-purple border-r"
|
? "text-purple border-r"
|
||||||
: "text-thin-light-gray"
|
: "text-thin-light-gray"
|
||||||
}`}
|
}`}
|
||||||
@@ -235,7 +224,7 @@ export default function FamilyTableNew() {
|
|||||||
<div className="flex-[0.9] h-full">
|
<div className="flex-[0.9] h-full">
|
||||||
<div className="h-full relative overflow-y-auto">
|
<div className="h-full relative overflow-y-auto">
|
||||||
<Suspense
|
<Suspense
|
||||||
fallback={<LoadingSpinner size="16" color="sky-blue" height='h-[30rem]' />}
|
fallback={<LoadingSpinner size="16" color="sky-blue" />}
|
||||||
>
|
>
|
||||||
{selectedTabComponent}
|
{selectedTabComponent}
|
||||||
</Suspense>
|
</Suspense>
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ export default function FullAccountDash(props) {
|
|||||||
className="mb-4"
|
className="mb-4"
|
||||||
data={userDetails}
|
data={userDetails}
|
||||||
bannerList={props.bannerList}
|
bannerList={props.bannerList}
|
||||||
|
nextDueTask={props.nextDueTask}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
case "FAMILY_PARENT_DASH":
|
case "FAMILY_PARENT_DASH":
|
||||||
@@ -30,6 +31,7 @@ export default function FullAccountDash(props) {
|
|||||||
className="mb-4"
|
className="mb-4"
|
||||||
data={userDetails}
|
data={userDetails}
|
||||||
bannerList={props.bannerList}
|
bannerList={props.bannerList}
|
||||||
|
nextDueTask={props.nextDueTask}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
case "WORKER_HOME_DASH":
|
case "WORKER_HOME_DASH":
|
||||||
@@ -38,6 +40,7 @@ export default function FullAccountDash(props) {
|
|||||||
className="mb-4"
|
className="mb-4"
|
||||||
data={userDetails}
|
data={userDetails}
|
||||||
bannerList={props.bannerList}
|
bannerList={props.bannerList}
|
||||||
|
nextDueTask={props.nextDueTask}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
case "JOBOWNER_HOME_DASH":
|
case "JOBOWNER_HOME_DASH":
|
||||||
@@ -46,6 +49,7 @@ export default function FullAccountDash(props) {
|
|||||||
className="mb-4"
|
className="mb-4"
|
||||||
data={userDetails}
|
data={userDetails}
|
||||||
bannerList={props.bannerList}
|
bannerList={props.bannerList}
|
||||||
|
nextDueTask={props.nextDueTask}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
default:
|
default:
|
||||||
@@ -58,18 +62,16 @@ export default function FullAccountDash(props) {
|
|||||||
<div className="home-page-wrapper">
|
<div className="home-page-wrapper">
|
||||||
{renderDashboard()}
|
{renderDashboard()}
|
||||||
{process.env.REACT_APP_SHOW_ACCOUNT_DASH == "1" && (
|
{process.env.REACT_APP_SHOW_ACCOUNT_DASH == "1" && (
|
||||||
<AccountDashboard className="mb-4" bannerList={props.bannerList} offersList={props.offersList} imageServer={props.imageServer} />
|
<AccountDashboard className="mb-4" bannerList={props.bannerList} offersList={props.offersList?.data} />
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/* {props?.dashTypes !== "undefined" &&
|
{props?.dashTypes !== "undefined" &&
|
||||||
props.offersList?.data?.result_list?.length ? (
|
props.offersList?.data?.result_list?.length ? (
|
||||||
<MyOffersTable
|
<MyOffersTable
|
||||||
MyActiveOffersList={props.offersList?.data}
|
MyActiveOffersList={props.offersList?.data}
|
||||||
className="mb-10"
|
className="mb-10"
|
||||||
/>
|
/>
|
||||||
)
|
) : props.MyActiveJobList?.data?.length ? (
|
||||||
:
|
|
||||||
props.MyActiveJobList?.data?.length ? (
|
|
||||||
<>
|
<>
|
||||||
<div className="w-full mb-5 flex justify-between items-center gap-1">
|
<div className="w-full mb-5 flex justify-between items-center gap-1">
|
||||||
<h1 className="text-26 font-bold text-dark-gray dark:text-white">
|
<h1 className="text-26 font-bold text-dark-gray dark:text-white">
|
||||||
@@ -82,7 +84,7 @@ export default function FullAccountDash(props) {
|
|||||||
imageServer={props.offersList?.data?.session_image_server}
|
imageServer={props.offersList?.data?.session_image_server}
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
) : null} */}
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -5,65 +5,68 @@ import usersService from "../../services/UsersService";
|
|||||||
import { useSelector } from "react-redux";
|
import { useSelector } from "react-redux";
|
||||||
import FamilyDash from "./FamilyDash";
|
import FamilyDash from "./FamilyDash";
|
||||||
import FullAccountDash from "./FullAccountDash";
|
import FullAccountDash from "./FullAccountDash";
|
||||||
import LoadingSpinner from '../../components/Spinners/LoadingSpinner'
|
|
||||||
|
|
||||||
export default function Home(props) {
|
export default function Home(props) {
|
||||||
// console.log("PROPS IN HOME->", props);
|
// console.log("PROPS IN HOME->", props);
|
||||||
const userApi = new usersService();
|
const userApi = new usersService();
|
||||||
const { commonHeadBanner } = useSelector((state) => state.commonHeadBanner);
|
const { commonHeadBanner } = useSelector((state) => state.commonHeadBanner);
|
||||||
|
|
||||||
|
let [nextDueTask, setNextDueTask] = useState({});
|
||||||
|
const [MyOffersList, setMyOffersList] = useState({loading: true, data: []});
|
||||||
|
|
||||||
const { userDetails } = useSelector((state) => state?.userDetails);
|
const { userDetails } = useSelector((state) => state?.userDetails);
|
||||||
|
|
||||||
// const [MyActiveJobList, setMyActiveJobList] = useState({loading:true, data:[]}); // STATE TO HOLD ACTIVE/CURRENT TASKS
|
const [MyActiveJobList, setMyActiveJobList] = useState({loading:true, data:[]}); // STATE TO HOLD ACTIVE/CURRENT TASKS
|
||||||
|
// const [MyActiveJobList, setMyActiveJobList] = useState([]); // STATE TO HOLD ACTIVE/CURRENT TASKS
|
||||||
|
|
||||||
// const getMyActiveJobList = async () => { // FUNCTION TO POPULATE ACTIVE/CURRENT TASK LIST
|
const getMyActiveJobList = async () => { // FUNCTION TO POPULATE ACTIVE/CURRENT TASK LIST
|
||||||
// try {
|
try {
|
||||||
// const res = await userApi.getMyActiveTaskList();
|
const res = await userApi.getMyActiveTaskList();
|
||||||
// setMyActiveJobList({loading:false, data:res?.data?.result_list});
|
setMyActiveJobList({loading:false, data:res?.data?.result_list});
|
||||||
// // setMyActiveJobList(res?.data?.result_list);
|
// setMyActiveJobList(res?.data?.result_list);
|
||||||
// } catch (error) {
|
} catch (error) {
|
||||||
// setMyActiveJobList({loading:false, data:[]});
|
setMyActiveJobList({loading:false, data:[]});
|
||||||
// // setMyActiveJobList([]);
|
// setMyActiveJobList([]);
|
||||||
// console.log("Error getting tasks");
|
console.log("Error getting tasks");
|
||||||
// }
|
}
|
||||||
// };
|
};
|
||||||
|
|
||||||
// FUNCTION TO GET DASH DATA TO DETERMINE CURRENT TASK DUE TIME
|
// FUNCTION TO GET DASH DATA TO DETERMINE CURRENT TASK DUE TIME
|
||||||
// const getHomeDate = () => {
|
const getHomeDate = () => {
|
||||||
// userApi
|
userApi
|
||||||
// .getHomeDate()
|
.getHomeDate()
|
||||||
// .then((res) => {
|
.then((res) => {
|
||||||
// if (res.status != 200 || res.internal_return < 0) {
|
if (res.status != 200 || res.internal_return < 0) {
|
||||||
// return;
|
return;
|
||||||
// }
|
}
|
||||||
// setNextDueTask(res.data);
|
setNextDueTask(res.data);
|
||||||
// })
|
})
|
||||||
// .catch((error) => {
|
.catch((error) => {
|
||||||
// console.log(error);
|
console.log(error);
|
||||||
// });
|
});
|
||||||
// };
|
};
|
||||||
|
|
||||||
// const getMyOffersList = async () => {
|
const getMyOffersList = async () => {
|
||||||
// try {
|
try {
|
||||||
// const res = await userApi.getOffersList();
|
const res = await userApi.getOffersList();
|
||||||
// setMyOffersList({loading:false, data:res.data});
|
setMyOffersList({loading:false, data:res.data});
|
||||||
// } catch (error) {
|
} catch (error) {
|
||||||
// setMyOffersList({loading:false, data:[]});
|
setMyOffersList({loading:false, data:[]});
|
||||||
// console.log("Error getting offers", error);
|
console.log("Error getting offers", error);
|
||||||
// }
|
}
|
||||||
// };
|
};
|
||||||
|
|
||||||
// useEffect(() => {
|
useEffect(() => {
|
||||||
// if(userDetails?.account_type == 'FULL'){
|
const fetchData = async () => {
|
||||||
// getMyActiveJobList();
|
await Promise.all([getHomeDate(), getMyOffersList(), getMyActiveJobList()]);
|
||||||
// }
|
};
|
||||||
// }, []);
|
if(userDetails?.account_type == 'FULL'){
|
||||||
|
fetchData();
|
||||||
|
}
|
||||||
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Layout>
|
<Layout>
|
||||||
{Object.keys(commonHeadBanner).length < 1 ?
|
|
||||||
<LoadingSpinner height='h-48' size='16' />
|
|
||||||
:
|
|
||||||
<div className="w-full">
|
<div className="w-full">
|
||||||
{userDetails && userDetails?.account_type == "FAMILY" ? (
|
{userDetails && userDetails?.account_type == "FAMILY" ? (
|
||||||
<FamilyDash
|
<FamilyDash
|
||||||
@@ -75,12 +78,11 @@ export default function Home(props) {
|
|||||||
/>
|
/>
|
||||||
) : userDetails && userDetails?.account_type == "FULL" ? (
|
) : userDetails && userDetails?.account_type == "FULL" ? (
|
||||||
<FullAccountDash
|
<FullAccountDash
|
||||||
|
nextDueTask={nextDueTask}
|
||||||
bannerList={props.bannerList}
|
bannerList={props.bannerList}
|
||||||
dashTypes={props.dashTypes}
|
dashTypes={props.dashTypes}
|
||||||
// offersList={MyOffersList}
|
offersList={MyOffersList}
|
||||||
// MyActiveJobList={MyActiveJobList}
|
MyActiveJobList={MyActiveJobList}
|
||||||
offersList={props.offersList}
|
|
||||||
imageServer={props.imageServer}
|
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<div>
|
<div>
|
||||||
@@ -88,7 +90,6 @@ export default function Home(props) {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
}
|
|
||||||
</Layout>
|
</Layout>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,152 +0,0 @@
|
|||||||
import React, {useState, useEffect} from "react";
|
|
||||||
import Layout from "../Partials/Layout";
|
|
||||||
|
|
||||||
import usersService from "../../services/UsersService";
|
|
||||||
import LoadingSpinner from "../Spinners/LoadingSpinner";
|
|
||||||
|
|
||||||
import TabButton from "../customTabs/TabButton";
|
|
||||||
|
|
||||||
export default function LearnMore() {
|
|
||||||
|
|
||||||
const apiCall = new usersService()
|
|
||||||
|
|
||||||
const [selectedTab, setSelectedTab] = useState("topic 1");
|
|
||||||
|
|
||||||
const [tabs, setTabs] = useState(
|
|
||||||
[ //STATE FOR SWITCHING BETWEEN TABS
|
|
||||||
{
|
|
||||||
id: 1,
|
|
||||||
title: "topic 1",
|
|
||||||
iconName: "history",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 2,
|
|
||||||
title: "topic 2",
|
|
||||||
iconName: "history",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 3,
|
|
||||||
title: "topic 3",
|
|
||||||
iconName: "history",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 4,
|
|
||||||
title: "topic 4",
|
|
||||||
iconName: "history",
|
|
||||||
},
|
|
||||||
]
|
|
||||||
)
|
|
||||||
|
|
||||||
// const tabs = [ //STATE FOR SWITCHING BETWEEN TABS
|
|
||||||
// {
|
|
||||||
// id: 1,
|
|
||||||
// title: "topic 1",
|
|
||||||
// iconName: "history",
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// id: 2,
|
|
||||||
// title: "topic 2",
|
|
||||||
// iconName: "history",
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// id: 3,
|
|
||||||
// title: "topic 3",
|
|
||||||
// iconName: "history",
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// id: 4,
|
|
||||||
// title: "topic 4",
|
|
||||||
// iconName: "history",
|
|
||||||
// },
|
|
||||||
// ]
|
|
||||||
|
|
||||||
let [topics, setTopics] = useState({ // FOR PAYMENT HISTORY
|
|
||||||
loading: true,
|
|
||||||
data: [],
|
|
||||||
})
|
|
||||||
|
|
||||||
//FUNCTION TO GET LEARN MORE TOPIC
|
|
||||||
|
|
||||||
useEffect(()=>{
|
|
||||||
apiCall.getLearnmoreTopics().then((res)=>{
|
|
||||||
if(res.data.internal_return < 0){ // success but no data
|
|
||||||
setTopics(prev => ({...prev, loading: false}))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
const resData = res?.data?.result_list
|
|
||||||
setTopics(prev => ({...prev, loading: false, data: resData}))
|
|
||||||
setTabs(prev => {
|
|
||||||
return prev.map((item, index) => ({...item, title:resData[index].topic}))
|
|
||||||
})
|
|
||||||
setSelectedTab(resData[0].topic)
|
|
||||||
// console.log('RES', resData)
|
|
||||||
}).catch((error)=>{
|
|
||||||
setTopics(prev => ({...prev, loading: false}))
|
|
||||||
})
|
|
||||||
}, [])
|
|
||||||
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<Layout>
|
|
||||||
<div className="history-wrapper w-full mb-10">
|
|
||||||
<div className="w-full">
|
|
||||||
<div className="sm:flex justify-between items-center mb-6">
|
|
||||||
<div className="mb-5 sm:mb-0">
|
|
||||||
<h1 className="text-26 font-bold text-dark-gray dark:text-white">
|
|
||||||
|
|
||||||
Learn More
|
|
||||||
|
|
||||||
</h1>
|
|
||||||
</div>
|
|
||||||
<div className="slider-btns flex space-x-4">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className="w-full h-full p-4 bg-white dark:bg-dark-white rounded-2xl section-shadow lg:flex lg:px-10 px-4 justify-between">
|
|
||||||
<div className="content-tab-items lg:w-[230px] w-full mr-2">
|
|
||||||
<div className='overflow-hidden mb-5 lg:mb-0 py-2 lg:py-8'>
|
|
||||||
{(!topics.loading && topics?.data?.length > 0) && tabs.map((item) => (
|
|
||||||
<div key={item.id} className='w-full'>
|
|
||||||
<TabButton
|
|
||||||
key={item.id}
|
|
||||||
item={item.title}
|
|
||||||
iconName={item.iconName}
|
|
||||||
selectedTab={selectedTab}
|
|
||||||
setSelectedTab={setSelectedTab}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className="w-[1px] bg-[#E3E4FE] dark:bg-[#a7a9b533] mr-10"></div>
|
|
||||||
<div className="flex-1 overflow-y-auto min-h-[520px]">
|
|
||||||
<>
|
|
||||||
{/* TOPICS SECTION */}
|
|
||||||
<div className="w-full py-2 lg:py-8">
|
|
||||||
{topics.loading ?
|
|
||||||
<LoadingSpinner size='16' color='sky-blue' height='h-[500px]' />
|
|
||||||
:
|
|
||||||
<>
|
|
||||||
{(topics?.data && topics?.data?.length > 0) ?
|
|
||||||
<div dangerouslySetInnerHTML={{
|
|
||||||
__html: topics?.data?.filter(item => item.topic == selectedTab)[0]?.contents,
|
|
||||||
}} className='prose dark:text-white dark:bg-dark-white'
|
|
||||||
>
|
|
||||||
{/* {topics?.data?.filter(item => item.topic == selectedTab)[0]?.contents} */}
|
|
||||||
</div>
|
|
||||||
:
|
|
||||||
<p className='p-2 text-slate-500 flex flex-col grow justify-center items-center'>No Topics found</p>}
|
|
||||||
</>
|
|
||||||
}
|
|
||||||
</div>
|
|
||||||
{/* END OF TOPICS SECTION */}
|
|
||||||
</>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</Layout>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -37,7 +37,7 @@ export default function MyTasks({
|
|||||||
<div className="notification-page w-full mb-10">
|
<div className="notification-page w-full mb-10">
|
||||||
<div className="notification-wrapper w-full">
|
<div className="notification-wrapper w-full">
|
||||||
{/* heading */}
|
{/* heading */}
|
||||||
<div className="sm:flex justify-between items-center hidden">
|
<div className="sm:flex justify-between items-center mb-6">
|
||||||
{/* <div className="w-full mb-5 sm:mb-0 flex justify-between items-center gap-1">
|
{/* <div className="w-full mb-5 sm:mb-0 flex justify-between items-center gap-1">
|
||||||
{userDetails.account_type == 'FAMILY' &&
|
{userDetails.account_type == 'FAMILY' &&
|
||||||
<h1 className="text-26 font-bold text-dark-gray dark:text-white">
|
<h1 className="text-26 font-bold text-dark-gray dark:text-white">
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ export default function TabButton({ item='', iconName='', selectedTab='', setSel
|
|||||||
<Icons name={iconName} />
|
<Icons name={iconName} />
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<p className="text-18 tracking-wide">{item[0]?.toUpperCase() + item?.slice(1)}</p>
|
<p className="text-18 tracking-wide">{item[0].toUpperCase() + item.slice(1)}</p>
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import LoadingSpinner from "../Spinners/LoadingSpinner";
|
|||||||
|
|
||||||
import { tableReload } from "../../store/TableReloads";
|
import { tableReload } from "../../store/TableReloads";
|
||||||
import { useDispatch } from "react-redux";
|
import { useDispatch } from "react-redux";
|
||||||
import { PriceFormatter } from "../Helpers/PriceFormatter";
|
|
||||||
|
|
||||||
function OfferJobPopout({ details, onClose, situation }) {
|
function OfferJobPopout({ details, onClose, situation }) {
|
||||||
const apiUrl = new usersService();
|
const apiUrl = new usersService();
|
||||||
@@ -22,12 +21,6 @@ function OfferJobPopout({ details, onClose, situation }) {
|
|||||||
trigger: "",
|
trigger: "",
|
||||||
});
|
});
|
||||||
|
|
||||||
let thePrice = PriceFormatter(
|
|
||||||
details?.price * 0.01,
|
|
||||||
details?.currency_code,
|
|
||||||
details?.currency
|
|
||||||
);
|
|
||||||
|
|
||||||
//FUNCTION TO HANDLE AN OFFER
|
//FUNCTION TO HANDLE AN OFFER
|
||||||
const handleOffer = ({ target: { name } }) => {
|
const handleOffer = ({ target: { name } }) => {
|
||||||
const reqData = {
|
const reqData = {
|
||||||
@@ -78,7 +71,6 @@ function OfferJobPopout({ details, onClose, situation }) {
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
onClose();
|
onClose();
|
||||||
dispatch(tableReload({ type: "MYTASKTABLE" }));
|
dispatch(tableReload({ type: "MYTASKTABLE" }));
|
||||||
dispatch(tableReload({ type: "HOMEBANNERS" }));
|
|
||||||
navigate("/mytask", { replace: true });
|
navigate("/mytask", { replace: true });
|
||||||
setRequestStatus({
|
setRequestStatus({
|
||||||
loading: false,
|
loading: false,
|
||||||
@@ -141,74 +133,56 @@ function OfferJobPopout({ details, onClose, situation }) {
|
|||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div className="grid md:grid-cols-4 bg-white dark:bg-dark-white rounded-lg">
|
<div className="md:flex bg-white dark:bg-dark-white rounded-lg">
|
||||||
<div className="md:col-span-3 md:border-r-2">
|
<div className="p-4 w-full md:w-3/4 md:border-r-2">
|
||||||
|
<p className="text-lg my-5 font-semibold text-slate-900 dark:text-white tracking-wide">
|
||||||
|
{details.title}
|
||||||
|
</p>
|
||||||
|
|
||||||
{/* INPUT SECTION */}
|
{/* INPUT SECTION */}
|
||||||
<div className='bg-[#FFFDEE] p-4 w-full'>
|
<div className="my-2 md:flex">
|
||||||
<div className='grid md:grid-cols-2'>
|
<Detail
|
||||||
<div className="my-2 md:flex">
|
label="Date"
|
||||||
<label className='job-label w-full md:w-[150px] md:text-right'>Date :</label>
|
value={
|
||||||
<p className={`p-1 w-full md:w-3/4 text-sm text-slate-900 dark:text-white`}>
|
(details.offer_added && details.offer_added?.split(" ")[0]) ||
|
||||||
{
|
"default"
|
||||||
(details.offer_added && details.offer_added?.split(" ")[0]) ||
|
}
|
||||||
"default"
|
/>
|
||||||
}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="my-2 md:flex">
|
|
||||||
<label className='job-label w-full md:w-[150px] md:text-right'>Expire :</label>
|
|
||||||
<p className={`p-1 w-full md:w-3/4 text-sm text-slate-900 dark:text-white`}>{details.expire && details.expire.split(" ")[0]}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className='grid md:grid-cols-2'>
|
|
||||||
<div className="my-2 md:flex">
|
|
||||||
<label className='job-label w-full md:w-[150px] md:text-right'>Reward :</label>
|
|
||||||
<p className={`p-1 w-full md:w-3/4 text-sm text-slate-900 dark:text-white`}>{thePrice}</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="my-2 md:flex">
|
|
||||||
<label className='job-label w-full md:w-[150px] md:text-right'>Duration :</label>
|
|
||||||
<p className={`p-1 w-full md:w-3/4 text-sm text-slate-900 dark:text-white`}>{`${details.timeline_days} day(s)`}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className='p-4 w-full'>
|
|
||||||
<p className="text-lg my-2 font-semibold text-slate-900 dark:text-white tracking-wide max-h-[200px] overflow-y-auto">
|
|
||||||
{details.title}
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<div className="my-2 md:flex">
|
|
||||||
<label className='job-label w-full md:w-[150px]'>Description :</label>
|
|
||||||
<p className={`p-1 w-full md:w-3/4 text-sm text-slate-900 dark:text-white max-h-[200px] overflow-y-auto`}>{details.description}</p>
|
|
||||||
{/* <Detail label="Description" value={details.description} /> */}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="my-2 md:flx">
|
|
||||||
{/* <label className='job-label w-full md:w-[150px]'>Detail</label>
|
|
||||||
<p className={`p-1 w-full md:w-3/4 text-sm text-slate-900 dark:text-white min-h-[100px] max-h-[200px] overflow-y-auto border-2 rounded-md`}>{details.job_description || details.job_detail}</p> */}
|
|
||||||
<label className="w-full text-slate-900 dark:text-white tracking-wide font-semibold">
|
|
||||||
Delivery Detail :
|
|
||||||
</label>
|
|
||||||
<textarea
|
|
||||||
className={`p-2 w-full text-sm text-slate-900 dark:text-white bg-transparent outline-none border border-slate-300 rounded-md`}
|
|
||||||
rows="5"
|
|
||||||
style={{ resize: "none" }}
|
|
||||||
value={details.job_description || details.job_detail}
|
|
||||||
readOnly
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div className="my-2 md:flex">
|
||||||
|
<Detail label="Description" value={details.description} />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="my-2 md:flex">
|
||||||
|
<Detail
|
||||||
|
label="Offer Expire"
|
||||||
|
value={details.expire && details.expire.split(" ")[0]}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="my-2 md:flex">
|
||||||
|
<Detail label="Reward" value={details.thePrice} />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="my-2 md:flex">
|
||||||
|
<Detail
|
||||||
|
label="Duration"
|
||||||
|
value={`${details.timeline_days} day(s)`}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="my-2 md:flex">
|
||||||
|
<Detail
|
||||||
|
label="Detail"
|
||||||
|
value={details.job_description || details.description}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* ACTION SECTION */}
|
{/* ACTION SECTION */}
|
||||||
<div className="p-4 w-full md:col-span-1 h-full flex flex-col justify-between">
|
<div className="p-4 w-full md:w-1/4 h-full">
|
||||||
<div className="my-3 md:flex flex-col md:justify-center">
|
<div className="my-3 md:flex md:justify-center">
|
||||||
<h1 className='mb-2 text-base font-semibold text-slate-900 dark:text-white tracking-wide'>I understand the task</h1>
|
|
||||||
{requestStatus.loading && requestStatus.trigger == "offer" ? (
|
{requestStatus.loading && requestStatus.trigger == "offer" ? (
|
||||||
<LoadingSpinner size={8} color="sky-blue" />
|
<LoadingSpinner size={8} color="sky-blue" />
|
||||||
) : (
|
) : (
|
||||||
@@ -216,9 +190,9 @@ function OfferJobPopout({ details, onClose, situation }) {
|
|||||||
name="accept"
|
name="accept"
|
||||||
onClick={handleOffer}
|
onClick={handleOffer}
|
||||||
disabled={requestStatus.loading}
|
disabled={requestStatus.loading}
|
||||||
className="px-2 h-28 flex justify-center items-center btn-gradient text-2xl rounded-xl text-white"
|
className="px-2 h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white"
|
||||||
>
|
>
|
||||||
Start Now
|
Accept Offer
|
||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
@@ -231,10 +205,9 @@ function OfferJobPopout({ details, onClose, situation }) {
|
|||||||
name="reject"
|
name="reject"
|
||||||
onClick={handleOffer}
|
onClick={handleOffer}
|
||||||
disabled={requestStatus.loading}
|
disabled={requestStatus.loading}
|
||||||
className="group relative px-2 h-11 flex justify-center items-center text-base text-black dark:text-white"
|
className="px-2 h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white"
|
||||||
>
|
>
|
||||||
Reject Offer
|
Reject Offer
|
||||||
<div className='absolute bottom-1 w-full h-[1px] bg-black hidden group-hover:block'></div>
|
|
||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
|
|||||||
const [loadProfileDetails, setLoadProfileDetails] = useState([]);
|
const [loadProfileDetails, setLoadProfileDetails] = useState([]);
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
||||||
const { jobListTable, marketTableList, walletTable, familyBannersListTable, homeBanners } = useSelector(
|
const { jobListTable, marketTableList, walletTable, familyBannersListTable } = useSelector(
|
||||||
(state) => state.tableReload
|
(state) => state.tableReload
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -111,26 +111,8 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
|
|||||||
}
|
}
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
//FUNCTION TO GET COMMON HEAD DATA
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if((!loggedIn && !isLogin.status) || account_type == 'FAMILY'){ // DO NOT CALL THIS, IF USER ACCOUNT TYPE IS FAMILY
|
const getNotifications = () => {
|
||||||
return
|
|
||||||
}
|
|
||||||
apiCall
|
|
||||||
.getHeroJBanners()
|
|
||||||
.then((res) => {
|
|
||||||
if (res.data?.internal_return < 0) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
dispatch(commonHeadBanner(res.data));
|
|
||||||
})
|
|
||||||
.catch((error) => {
|
|
||||||
console.log("ERROR ", error);
|
|
||||||
});
|
|
||||||
}, [isLogin.status, homeBanners]);
|
|
||||||
|
|
||||||
useEffect(() => { // FUNCTION TO GET NOTIFICATIONS LIST
|
|
||||||
const notifications = () => {
|
|
||||||
// function to load user notification
|
// function to load user notification
|
||||||
dispatch(updateNotifications({ loading: true }));
|
dispatch(updateNotifications({ loading: true }));
|
||||||
apiCall
|
apiCall
|
||||||
@@ -186,9 +168,7 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
|
|||||||
dispatch(updateNotifications({ loading: false, data: null }));
|
dispatch(updateNotifications({ loading: false, data: null }));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
// delay verify requests by 10000ms
|
getNotifications();
|
||||||
const delay15secs = setTimeout(notifications, 15000)
|
|
||||||
return ()=> clearTimeout(delay15secs)
|
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -250,23 +230,41 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
|
|||||||
}, [apiCall, dispatch, marketTableList, isLogin.status]);
|
}, [apiCall, dispatch, marketTableList, isLogin.status]);
|
||||||
|
|
||||||
//FUNCTION TO GET COMMON HEAD DATA
|
//FUNCTION TO GET COMMON HEAD DATA
|
||||||
// useEffect(() => {
|
useEffect(() => {
|
||||||
// if((!loggedIn && !isLogin.status) || account_type == 'FAMILY'){ // DO NOT CALL THIS, IF USER ACCOUNT TYPE IS FAMILY
|
if((!loggedIn && !isLogin.status) || account_type == 'FAMILY'){ // DO NOT CALL THIS, IF USER ACCOUNT TYPE IS FAMILY
|
||||||
// return
|
return
|
||||||
// }
|
}
|
||||||
// apiCall
|
apiCall
|
||||||
// .getRecentActivitiedData()
|
.getHeroJBanners()
|
||||||
// .then((res) => {
|
.then((res) => {
|
||||||
// // debugger;
|
if (res.data?.internal_return < 0) {
|
||||||
// if (res?.data?.internal_return < 0) {
|
return;
|
||||||
// return;
|
}
|
||||||
// }
|
dispatch(commonHeadBanner(res.data));
|
||||||
// dispatch(recentActivitiesData(res.data));
|
})
|
||||||
// })
|
.catch((error) => {
|
||||||
// .catch((error) => {
|
console.log("ERROR ", error);
|
||||||
// console.log("ERROR ", error);
|
});
|
||||||
// });
|
}, [isLogin.status]);
|
||||||
// }, [isLogin.status]);
|
|
||||||
|
//FUNCTION TO GET COMMON HEAD DATA
|
||||||
|
useEffect(() => {
|
||||||
|
if((!loggedIn && !isLogin.status) || account_type == 'FAMILY'){ // DO NOT CALL THIS, IF USER ACCOUNT TYPE IS FAMILY
|
||||||
|
return
|
||||||
|
}
|
||||||
|
apiCall
|
||||||
|
.getRecentActivitiedData()
|
||||||
|
.then((res) => {
|
||||||
|
// debugger;
|
||||||
|
if (res?.data?.internal_return < 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
dispatch(recentActivitiesData(res.data));
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
console.log("ERROR ", error);
|
||||||
|
});
|
||||||
|
}, [isLogin.status]);
|
||||||
|
|
||||||
|
|
||||||
//FUNCTION TO GET FAMILY BANNERS
|
//FUNCTION TO GET FAMILY BANNERS
|
||||||
|
|||||||
@@ -1502,25 +1502,14 @@ class usersService {
|
|||||||
return this.postAuxEnd("/promoverify", postData);
|
return this.postAuxEnd("/promoverify", postData);
|
||||||
}
|
}
|
||||||
|
|
||||||
// API FUNCTION TO LOGIN USER THROUGH PROMO LINK
|
// API FUNCTION TO LOGIN USER THROUGH PROMO LINK
|
||||||
loginPromo(reqData) {
|
loginPromo(reqData) {
|
||||||
var postData = {
|
var postData = {
|
||||||
action: apiConst.WRENCHBOARD_LOGIN_PROMO,
|
action: apiConst.WRENCHBOARD_LOGIN_PROMO,
|
||||||
...reqData
|
...reqData
|
||||||
};
|
};
|
||||||
return this.postAuxEnd("/loginpromo", postData);
|
return this.postAuxEnd("/loginpromo", postData);
|
||||||
}
|
}
|
||||||
|
|
||||||
// API FUNCTION TO GET LEARN MORE TOPICS
|
|
||||||
getLearnmoreTopics() {
|
|
||||||
var postData = {
|
|
||||||
member_uid: localStorage.getItem("uid"),
|
|
||||||
member_id: localStorage.getItem("member_id"),
|
|
||||||
sessionid: localStorage.getItem("session_token"),
|
|
||||||
// action: apiConst.WRENCHBOARD_LOGIN_PROMO,
|
|
||||||
};
|
|
||||||
return this.postAuxEnd("/learnmore", postData);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
- 20:27:30.118 FLOG_MAX [757411]: REQ_STRING(username)
|
- 20:27:30.118 FLOG_MAX [757411]: REQ_STRING(username)
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ const initialState = {
|
|||||||
familyOfferList: false,
|
familyOfferList: false,
|
||||||
parentFamilyTaskList: false,
|
parentFamilyTaskList: false,
|
||||||
offerInterestListReload: false,
|
offerInterestListReload: false,
|
||||||
homeBanners: false,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export const tableReloadSlice = createSlice({
|
export const tableReloadSlice = createSlice({
|
||||||
@@ -62,9 +61,6 @@ export const tableReloadSlice = createSlice({
|
|||||||
case "OFFERINTERESTLISTRELOAD": // to reload offer interest list of owner when a worker sends interest in a job
|
case "OFFERINTERESTLISTRELOAD": // to reload offer interest list of owner when a worker sends interest in a job
|
||||||
state.offerInterestListReload = !state.offerInterestListReload;
|
state.offerInterestListReload = !state.offerInterestListReload;
|
||||||
return;
|
return;
|
||||||
case "HOMEBANNERS": // to reload offer interest list of owner when a worker sends interest in a job
|
|
||||||
state.homeBanners = !state.homeBanners;
|
|
||||||
return;
|
|
||||||
default:
|
default:
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-14
@@ -1,23 +1,13 @@
|
|||||||
import {useState, useEffect} from 'react'
|
|
||||||
import { useSelector } from "react-redux";
|
import { useSelector } from "react-redux";
|
||||||
import Home from "../components/Home";
|
import Home from "../components/Home";
|
||||||
|
|
||||||
export default function HomePages() {
|
export default function HomePages() {
|
||||||
const { commonHeadBanner } = useSelector((state) => state.commonHeadBanner);
|
const { commonHeadBanner } = useSelector((state) => state.commonHeadBanner);
|
||||||
|
|
||||||
const [bannerOptions, setBannerOptions] = useState({})
|
const bannerOptions = {
|
||||||
|
bannerList: commonHeadBanner?.result_list,
|
||||||
|
dashTypes: commonHeadBanner?.home_dash_type,
|
||||||
|
};
|
||||||
useEffect(()=>{
|
|
||||||
const bannerOptions = {
|
|
||||||
bannerList: commonHeadBanner?.result_list,
|
|
||||||
dashTypes: commonHeadBanner?.home_dash_type,
|
|
||||||
offersList: commonHeadBanner?.offers_list,
|
|
||||||
imageServer: commonHeadBanner?.session_image_server
|
|
||||||
};
|
|
||||||
setBannerOptions(bannerOptions)
|
|
||||||
},[commonHeadBanner])
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
import React from "react";
|
|
||||||
import LearnMore from "../components/LearnMore/LearnMore";
|
|
||||||
|
|
||||||
export default function LearnMorePage() {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<LearnMore />
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user