Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ec97d118b2 | |||
| f9b6c68f99 | |||
| 2a4b77c9a0 | |||
| 97aa5dba21 | |||
| 58a10ca6be | |||
| f3edf1d90b | |||
| 1f7b310b6f | |||
| aecb06ca96 | |||
| d89194f18e | |||
| 03866d666b | |||
| 4224be46bc |
Binary file not shown.
|
After Width: | Height: | Size: 6.2 KiB |
@@ -1,11 +1,15 @@
|
|||||||
import React, { useEffect } from 'react';
|
import React, { useEffect } from 'react';
|
||||||
import { useLocation, useNavigate } from 'react-router-dom';
|
import { useLocation, useNavigate } from 'react-router-dom';
|
||||||
import usersService from '../../../services/UsersService';
|
import usersService from '../../../services/UsersService';
|
||||||
|
import {updateUserDetails} from "../../../store/UserDetails";
|
||||||
|
import { useDispatch } from "react-redux";
|
||||||
|
import AuthLayout from "../AuthLayout";
|
||||||
|
|
||||||
function Redirect() {
|
function Redirect() {
|
||||||
const location = useLocation();
|
const location = useLocation();
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const userApi = new usersService();
|
const userApi = new usersService();
|
||||||
|
const dispatch = useDispatch()
|
||||||
|
|
||||||
const queryParams = new URLSearchParams(location?.search);
|
const queryParams = new URLSearchParams(location?.search);
|
||||||
const codeResponse = queryParams.get("code");
|
const codeResponse = queryParams.get("code");
|
||||||
@@ -35,19 +39,27 @@ function Redirect() {
|
|||||||
userApi
|
userApi
|
||||||
.authStart(reqData)
|
.authStart(reqData)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log(res.data);
|
if (res.status != 200) {
|
||||||
if (res.status != 200 || res.internal_return < 0) {
|
navigate('/login', {replace: true})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// "{"message":"Endpoint not found.","URI":"http:\/\/localhost:9083\/index.php\/en\/wrench\/api\/v1\/authstart"}[]"
|
|
||||||
alert(JSON.stringify(res.data));
|
localStorage.setItem("member_id", `${res.data.member_id}`);
|
||||||
|
localStorage.setItem("uid", `${res.data.uid}`);
|
||||||
|
localStorage.setItem("session_token", `${res.data.session}`);
|
||||||
|
dispatch(updateUserDetails({...res.data, loggedIn:true}));
|
||||||
|
navigate('/', {replace: true})
|
||||||
|
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
|
navigate('/login', {replace: true})
|
||||||
console.log(error);
|
console.log(error);
|
||||||
});
|
});
|
||||||
},[])
|
},[])
|
||||||
return (
|
return (
|
||||||
<div>Redirecting ... </div>
|
<AuthLayout>
|
||||||
|
<div className='min-h-[70vh]'>Redirecting ... </div>
|
||||||
|
</AuthLayout>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,8 @@ export default function FamilyActiveJobsCard({ datas, hidden = false }) {
|
|||||||
toast.warn("Remove to Favorite List");
|
toast.warn("Remove to Favorite List");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
//debugger;
|
||||||
|
const bannerName = datas.banner == null ?'default.jpg':datas.banner;
|
||||||
return (
|
return (
|
||||||
<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="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">
|
||||||
@@ -32,7 +33,7 @@ export default function FamilyActiveJobsCard({ datas, hidden = false }) {
|
|||||||
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={{
|
style={{
|
||||||
background: `url(${localImgLoad(
|
background: `url(${localImgLoad(
|
||||||
`images/taskbanners/${datas.banner}`
|
`images/taskbanners/${bannerName}`
|
||||||
)}) center / contain no-repeat`,
|
)}) center / contain no-repeat`,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -17,21 +17,21 @@ export default function HomeBannerOffersCard(props) {
|
|||||||
return (
|
return (
|
||||||
<Link
|
<Link
|
||||||
to={link_result}
|
to={link_result}
|
||||||
className="item w-full block group banner-630-340 bg-cover bg-center"
|
className="item p-2 w-full flex items-center min-h-[340px] bg-alice-blue bg-cover bg-center"
|
||||||
style={{
|
style={{
|
||||||
backgroundImage: `url('${imageUrl}')`,
|
backgroundImage: `url('${imageUrl}')`,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div className="flex flex-col justify-between h-full">
|
<div className="w-[80%] h-full mx-auto flex flex-col justify-between">
|
||||||
<div className="content flex justify-between items-center">
|
<div className="content flex justify-between items-center">
|
||||||
<div className="siderCardHeader">
|
<div className="mb-2">
|
||||||
<h1 className="text-2xl font-bold text-dark-gray dark:text-white tracking-wide">
|
<h1 className="text-2xl lg:text-4xl font-bold text-dark-gray dark:text-white tracking-wide">
|
||||||
<span className="heroSilderTitle">{props.itemData.title}</span>
|
<span className="heroSilderTitle">{props.itemData.title}</span>
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex flex-col justify-around items-center flex-1">
|
<div className="flex flex-col justify-around items-center flex-1">
|
||||||
<div className="siderCardDescription">
|
<div className="siderCardDescription mb-2">
|
||||||
{props.itemData.description}
|
{props.itemData.description}
|
||||||
</div>
|
</div>
|
||||||
<button className="w-[150px] h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white">
|
<button className="w-[150px] h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white">
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
import { toast } from "react-toastify";
|
import { toast } from "react-toastify";
|
||||||
import heroBg from "../../assets/images/hero-bg.svg";
|
import heroBg from "../../assets/images/bg-sky-blue.jpg"; //hero-bg.svg";
|
||||||
import heroUser from "../../assets/images/hero-user.png";
|
import heroUser from "../../assets/images/hero-user.png";
|
||||||
import CountDown from "../Helpers/CountDown";
|
import CountDown from "../Helpers/CountDown";
|
||||||
import HomeSliders from "./HomeSliders";
|
import HomeSliders from "./HomeSliders";
|
||||||
@@ -24,7 +24,7 @@ export default function Hero({ className, bannerList, nextDueTask }) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={`w-full lg:h-[444px] h-full lg:flex lg:p-8 p-4 justify-between items-center lg:space-x-28 rounded-2xl overflow-hidden ${
|
className={`w-full min-h-[400px] md:grid grid-cols-2 lg:p-8 p-4 justify-between items-center gap-2 rounded-2xl overflow-hidden ${
|
||||||
className || ""
|
className || ""
|
||||||
}`}
|
}`}
|
||||||
style={{
|
style={{
|
||||||
@@ -33,7 +33,7 @@ export default function Hero({ className, bannerList, nextDueTask }) {
|
|||||||
backgroundSize: "cover",
|
backgroundSize: "cover",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div className="flex-1 h-[330px] lg:h-full flex flex-col justify-between mb-5 lg:mb-0">
|
<div className="h-full flex flex-col justify-between mb-5 lg:mb-0">
|
||||||
{/* heading */}
|
{/* heading */}
|
||||||
<div>
|
<div>
|
||||||
<h1 className="lg:text-2xl text-xl font-medium text-white tracking-wide">
|
<h1 className="lg:text-2xl text-xl font-medium text-white tracking-wide">
|
||||||
@@ -57,7 +57,7 @@ export default function Hero({ className, bannerList, nextDueTask }) {
|
|||||||
</div>
|
</div>
|
||||||
{/* countdown */}
|
{/* countdown */}
|
||||||
{nextDueTask?.next_due && Object.keys(nextDueTask.next_due)?.length != 0 && (
|
{nextDueTask?.next_due && Object.keys(nextDueTask.next_due)?.length != 0 && (
|
||||||
<div className="w-full h-32 flex justify-evenly items-center sm:p-6 p-1 rounded-2xl border border-white-opacity">
|
<div className="w-full h-32 flex justify-evenly items-center sm:p-6 p-1 rounded-2xl border back-dark1 border-white-opacity">
|
||||||
<div className="flex flex-col justify-between">
|
<div className="flex flex-col justify-between">
|
||||||
<p className="text-base text-white tracking-wide">Current Task</p>
|
<p className="text-base text-white tracking-wide">Current Task</p>
|
||||||
<p className="lg:text-2xl text-lg font-bold tracking-wide text-white">
|
<p className="lg:text-2xl text-lg font-bold tracking-wide text-white">
|
||||||
@@ -84,7 +84,7 @@ export default function Hero({ className, bannerList, nextDueTask }) {
|
|||||||
)}
|
)}
|
||||||
{/* action */}
|
{/* action */}
|
||||||
<div className="flex lg:space-x-3 space-x-1 items-center">
|
<div className="flex lg:space-x-3 space-x-1 items-center">
|
||||||
<Link to="/mytask" className="text-white text-base sm:block hidden">
|
<Link to="/mytask" className="text-white text-base">
|
||||||
<span className=" border-b dark:border-[#5356fb29] border-white">
|
<span className=" border-b dark:border-[#5356fb29] border-white">
|
||||||
{" "}
|
{" "}
|
||||||
View All Task(s)
|
View All Task(s)
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ export default function HomeSliders(props) {
|
|||||||
// debugger;
|
// debugger;
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="hero-slider relative 2xl:w-[600px] xl:w-[400px] lg:w-[420px] w-full mb-2 lg:mb-0 ">
|
<div className="hero-slider relative h-full w-full mb-2 lg:mb-0">
|
||||||
<div className="w-full">
|
<div className="w-full">
|
||||||
<SliderCom settings={props.settings}>
|
<SliderCom settings={props.settings}>
|
||||||
{props.bannerList?.length <= 0 && (
|
{props.bannerList?.length <= 0 && (
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import background from "../../assets/images/shape/balance-bg.svg";
|
import background from "../../assets/images/bg-sky-blue.jpg" //shape/balance-bg.svg";
|
||||||
import {PriceFormatter} from "../Helpers/PriceFormatter";
|
import {PriceFormatter} from "../Helpers/PriceFormatter";
|
||||||
import {Link} from "react-router-dom";
|
import {Link} from "react-router-dom";
|
||||||
|
|
||||||
@@ -47,9 +47,11 @@ export default function WalletItemCard({walletItem}) {
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div className="counters flex space-x-16">
|
<div className="counters flex space-x-16">
|
||||||
<Link to='transfer-fund' className='px-2 py-1 flex items-center gap-2 user-balance cursor-pointer h-[48px] rounded-full relative bg-purple lg:text-xl text-lg font-bold text-white'>Transfer</Link>:''
|
{
|
||||||
|
walletItem.action_type != 'AC_AD_FD_ONLY' ?
|
||||||
<Link to='add-fund' state={{currency:walletItem.description}} className='px-2 py-1 flex items-center gap-2 user-balance cursor-pointer h-[48px] rounded-full relative bg-green lg:text-xl text-lg font-bold text-white'>
|
<Link to='transfer-fund' className='px-2 py-1 flex items-center gap-2 user-balance cursor-pointer h-[40px] rounded-full relative bg-purple lg:text-xl text-lg font-bold text-white'>Transfer</Link>:''
|
||||||
|
}
|
||||||
|
<Link to='add-fund' state={{currency:walletItem.description}} className='px-2 py-1 flex items-center gap-2 user-balance cursor-pointer h-[40px] rounded-full relative bg-white lg:text-xl text-lg font-bold'>
|
||||||
<span className="">
|
<span className="">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="38"
|
<svg xmlns="http://www.w3.org/2000/svg" width="38"
|
||||||
height="38" viewBox="0 0 42 42" fill="none"><path
|
height="38" viewBox="0 0 42 42" fill="none"><path
|
||||||
@@ -57,7 +59,7 @@ export default function WalletItemCard({walletItem}) {
|
|||||||
fill="white"></path>
|
fill="white"></path>
|
||||||
</svg>
|
</svg>
|
||||||
</span>
|
</span>
|
||||||
<span className='text-white'>Add Credit</span>
|
<span className='text-black'>Add Credit</span>
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
{/*<div className="circle-count">*/}
|
{/*<div className="circle-count">*/}
|
||||||
|
|||||||
+4
-8
@@ -27,10 +27,12 @@
|
|||||||
.heroSilderTitle{
|
.heroSilderTitle{
|
||||||
text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
|
text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
|
||||||
font-family: sans; color: white;
|
font-family: sans; color: white;
|
||||||
font-size: 42px;
|
|
||||||
font-family: Circular, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif;
|
font-family: Circular, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif;
|
||||||
}
|
}
|
||||||
|
.back-dark1{
|
||||||
|
background-color: #193F5F;
|
||||||
|
min-width: 280px !important;
|
||||||
|
}
|
||||||
.job-action{
|
.job-action{
|
||||||
background-color: aliceblue;
|
background-color: aliceblue;
|
||||||
height: 100px;
|
height: 100px;
|
||||||
@@ -49,13 +51,7 @@
|
|||||||
color: white;
|
color: white;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
.siderCardHeader{
|
|
||||||
margin: 40px 40px 10px 40px;
|
|
||||||
font-size: 24px;
|
|
||||||
font-weight: bolder;
|
|
||||||
}
|
|
||||||
.siderCardDescription{
|
.siderCardDescription{
|
||||||
margin: 10px 45px 10px 45px;
|
|
||||||
background-color: aliceblue;
|
background-color: aliceblue;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
|
|||||||
@@ -10,6 +10,10 @@ class usersService {
|
|||||||
return this.postAuxEnd("/createuser", reqData);
|
return this.postAuxEnd("/createuser", reqData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CompleteOauthLogin(reqData) {
|
||||||
|
localStorage.setItem("session_token", ``);
|
||||||
|
return this.postAuxEnd("/authlogin", reqData);
|
||||||
|
}
|
||||||
CompleteSignUp(reqData) {
|
CompleteSignUp(reqData) {
|
||||||
localStorage.setItem("session_token", ``);
|
localStorage.setItem("session_token", ``);
|
||||||
return this.postAuxEnd("/completesignuplink", reqData);
|
return this.postAuxEnd("/completesignuplink", reqData);
|
||||||
|
|||||||
Reference in New Issue
Block a user