From b1f1b34924976c05f434a7fd7d23fc259a363947 Mon Sep 17 00:00:00 2001 From: acidumirae Date: Sun, 9 Jul 2023 07:58:31 +0800 Subject: [PATCH 01/15] API calls for authstart and authlogin; Call authlogin with code and redirect URI to do the token exchange on the backend --- .../AuthPages/AuthRedirect/Redirect.jsx | 37 +++++++++++++++++-- src/services/UsersService.js | 13 ++++++- 2 files changed, 46 insertions(+), 4 deletions(-) diff --git a/src/components/AuthPages/AuthRedirect/Redirect.jsx b/src/components/AuthPages/AuthRedirect/Redirect.jsx index 22a5c84..177c1a9 100644 --- a/src/components/AuthPages/AuthRedirect/Redirect.jsx +++ b/src/components/AuthPages/AuthRedirect/Redirect.jsx @@ -1,9 +1,11 @@ -import React, {useState, useEffect} from 'react' -import { useLocation, useNavigate } from 'react-router-dom' +import React, { useEffect } from 'react'; +import { useLocation, useNavigate } from 'react-router-dom'; +import usersService from '../../../services/UsersService'; function Redirect() { const location = useLocation(); const navigate = useNavigate(); + const userApi = new usersService(); const queryParams = new URLSearchParams(location?.search); const codeResponse = queryParams.get("code"); @@ -13,7 +15,36 @@ function Redirect() { navigate('/login', {replace: true}) return } - console.log(codeResponse) + console.log(codeResponse); + /* + POST /token HTTP/1.1 + Host: oauth2.googleapis.com + Content-Type: application/x-www-form-urlencoded + + code=4/P7q7W91a-oMsCeLvIaQm6bTrgtp7& + client_id=your_client_id& + client_secret=your_client_secret& + redirect_uri=https%3A//oauth2.example.com/code& + grant_type=authorization_code + */ + var reqData = { + code: codeResponse, + redirect_uri: process.env.REACT_APP_GOOGLE_REDIRECT_URL, + }; + userApi + .authStart(reqData) + .then((res) => { + console.log(res.data); + if (res.status != 200 || res.internal_return < 0) { + return; + } + // "{"message":"Endpoint not found.","URI":"http:\/\/localhost:9083\/index.php\/en\/wrench\/api\/v1\/authstart"}[]" + const data = JSON.parse(res.data.replace('[]','')); + alert(data.message); + }) + .catch((error) => { + console.log(error); + }); },[]) return (
Redirecting ...
diff --git a/src/services/UsersService.js b/src/services/UsersService.js index 8a38d16..2656169 100644 --- a/src/services/UsersService.js +++ b/src/services/UsersService.js @@ -1,4 +1,3 @@ -import React from "react"; import Axios from "axios"; class usersService { @@ -26,10 +25,22 @@ class usersService { }; return this.postAuxEnd("/dashdata", postData); } + logInUser(reqData) { localStorage.setItem("session_token", ``); return this.postAuxEnd("/userlogin", reqData); } + + authStart(reqData) { + localStorage.setItem("session_token", ``); + return this.postAuxEnd("/authstart", reqData); + } + + authLogin(reqData) { + localStorage.setItem("session_token", ``); + return this.postAuxEnd("/authlogin", reqData); + } + marketJobData(reqData) { var postData = { uuid: localStorage.getItem("uuid"), -- 2.34.1 From 133f50084959050d6dbb0674af77fd6275772393 Mon Sep 17 00:00:00 2001 From: acidumirae Date: Sun, 9 Jul 2023 08:19:17 +0800 Subject: [PATCH 02/15] Specify login channel --- src/components/AuthPages/AuthRedirect/Redirect.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/AuthPages/AuthRedirect/Redirect.jsx b/src/components/AuthPages/AuthRedirect/Redirect.jsx index 177c1a9..aade540 100644 --- a/src/components/AuthPages/AuthRedirect/Redirect.jsx +++ b/src/components/AuthPages/AuthRedirect/Redirect.jsx @@ -28,6 +28,7 @@ function Redirect() { grant_type=authorization_code */ var reqData = { + login_channel: "990010", /* LOGIN_GOOGLE */ code: codeResponse, redirect_uri: process.env.REACT_APP_GOOGLE_REDIRECT_URL, }; @@ -51,4 +52,4 @@ function Redirect() { ) } -export default Redirect \ No newline at end of file +export default Redirect -- 2.34.1 From 6fd92600b4e0d580fe934f0592bd57526486fc74 Mon Sep 17 00:00:00 2001 From: acidumirae Date: Sun, 9 Jul 2023 08:47:00 +0800 Subject: [PATCH 03/15] Specify login channel --- src/components/AuthPages/AuthRedirect/Redirect.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/AuthPages/AuthRedirect/Redirect.jsx b/src/components/AuthPages/AuthRedirect/Redirect.jsx index aade540..6908167 100644 --- a/src/components/AuthPages/AuthRedirect/Redirect.jsx +++ b/src/components/AuthPages/AuthRedirect/Redirect.jsx @@ -28,7 +28,7 @@ function Redirect() { grant_type=authorization_code */ var reqData = { - login_channel: "990010", /* LOGIN_GOOGLE */ + auth_type: "GOOGLE", code: codeResponse, redirect_uri: process.env.REACT_APP_GOOGLE_REDIRECT_URL, }; -- 2.34.1 From 625928e34b588e4e3f0bd80f496a524c2d01ce29 Mon Sep 17 00:00:00 2001 From: acidumirae Date: Sun, 9 Jul 2023 09:31:45 +0800 Subject: [PATCH 04/15] Message fix --- src/components/AuthPages/AuthRedirect/Redirect.jsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/AuthPages/AuthRedirect/Redirect.jsx b/src/components/AuthPages/AuthRedirect/Redirect.jsx index 6908167..4f45717 100644 --- a/src/components/AuthPages/AuthRedirect/Redirect.jsx +++ b/src/components/AuthPages/AuthRedirect/Redirect.jsx @@ -40,8 +40,7 @@ function Redirect() { return; } // "{"message":"Endpoint not found.","URI":"http:\/\/localhost:9083\/index.php\/en\/wrench\/api\/v1\/authstart"}[]" - const data = JSON.parse(res.data.replace('[]','')); - alert(data.message); + alert(JSON.stringify(res.data)); }) .catch((error) => { console.log(error); -- 2.34.1 From 72da5c707a57dc8ad4fb203e22141a0d8f195a61 Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Sat, 8 Jul 2023 21:44:45 -0400 Subject: [PATCH 05/15] wallet adjust --- src/components/MyWallet/Wallet.jsx | 4 +- src/components/MyWallet/WalletBox.jsx | 273 +++++++++++++++++++++ src/components/MyWallet/WalletItemCard.jsx | 132 ++++++++++ 3 files changed, 408 insertions(+), 1 deletion(-) create mode 100644 src/components/MyWallet/WalletBox.jsx create mode 100644 src/components/MyWallet/WalletItemCard.jsx diff --git a/src/components/MyWallet/Wallet.jsx b/src/components/MyWallet/Wallet.jsx index 23cf8fe..b2bee7c 100644 --- a/src/components/MyWallet/Wallet.jsx +++ b/src/components/MyWallet/Wallet.jsx @@ -10,6 +10,7 @@ import AddFund from './AddFund' import AddRecipient from './AddRecipient' import ConfirmTransfer from './ConfirmTransfer' import ConfirmAddFund from './ConfirmAddFund' +import WalletBox from "./WalletBox"; function Wallet() { return ( @@ -71,7 +72,8 @@ const WalletRoutes = () => { } /> } /> } /> - } /> + {/*} />*/} + } /> } /> } /> } /> diff --git a/src/components/MyWallet/WalletBox.jsx b/src/components/MyWallet/WalletBox.jsx new file mode 100644 index 0000000..4e8969c --- /dev/null +++ b/src/components/MyWallet/WalletBox.jsx @@ -0,0 +1,273 @@ +import React from "react"; +import bank1 from "../../assets/images/bank-1.png"; +import bank2 from "../../assets/images/bank-2.png"; +import bank3 from "../../assets/images/bank-3.png"; +import bank4 from "../../assets/images/bank-4.png"; +import Layout from "../Partials/Layout"; +import CurrencyStaticsSection from "./CurrencyStaticsSection"; +import CurrentBalanceWidget from "./CurrentBalanceWidget"; +import InvestmentSection from "./InvestmentSection"; +import RecentTransactionWidget from "./RecentTransactionWidget"; +import LoadingSpinner from "../Spinners/LoadingSpinner"; +import WalletItemCard from "./WalletItemCard"; + +export default function WalletBox({wallet, coupon}) { + return ( + <> + +
+
+
+ {wallet.loading ? + + : + wallet.data.length ? + wallet.data.map((item, index)=> ( +
+ +
+ )) : '' + } + + {/*
*/} + {/* */} + {/*
*/} + {/*
*/} + {/*
*/} + {/*
*/} + {/*

*/} + {/* My Wallet*/} + {/*

*/} + {/*
*/} + {/*
*/} + {/*
*/} + {/*
*/} + {/*
*/} + {/*
*/} + {/* */} + {/*
*/} + {/*
*/} + {/*

*/} + {/* MetaMask*/} + {/*

*/} + {/*
*/} + {/*
*/} + {/*
*/} + {/*
*/} + {/*
*/} + {/*

*/} + {/* $734.79*/} + {/*

*/} + {/*

*/} + {/* New Add*/} + {/* */} + {/* +324.75*/} + {/* */} + {/*

*/} + {/*
*/} + {/*
*/} + {/**/} + {/* */} + {/* */} + {/* */} + {/* */} + {/* */} + {/**/} + {/*
*/} + {/*
*/} + {/*
*/} + {/*
*/} + {/*
*/} + {/*
*/} + {/*
*/} + {/* */} + {/*
*/} + {/*
*/} + {/*

*/} + {/* Coinbase Wallet*/} + {/*

*/} + {/*
*/} + {/*
*/} + {/*
*/} + {/*
*/} + {/*
*/} + {/*

*/} + {/* $734.79*/} + {/*

*/} + {/*

*/} + {/* New Add*/} + {/* */} + {/* +324.75*/} + {/* */} + {/*

*/} + {/*
*/} + {/*
*/} + {/**/} + {/* */} + {/* */} + {/* */} + {/* */} + {/* */} + {/**/} + {/*
*/} + {/*
*/} + {/*
*/} + {/*
*/} + {/*
*/} + {/*
*/} + {/*
*/} + {/* */} + {/*
*/} + {/*
*/} + {/*

*/} + {/* Bitski*/} + {/*

*/} + {/*
*/} + {/*
*/} + {/*
*/} + {/*
*/} + {/*
*/} + {/*

*/} + {/* $734.79*/} + {/*

*/} + {/*

*/} + {/* New Add*/} + {/* */} + {/* +324.75*/} + {/* */} + {/*

*/} + {/*
*/} + {/*
*/} + {/**/} + {/* */} + {/* */} + {/* */} + {/* */} + {/* */} + {/**/} + {/*
*/} + {/*
*/} + {/*
*/} + {/*
*/} + {/*
*/} + {/*
*/} + {/*
*/} + {/* */} + {/*
*/} + {/*
*/} + {/*

*/} + {/* WalletConnect*/} + {/*

*/} + {/*
*/} + {/*
*/} + {/*
*/} + {/*
*/} + {/*
*/} + {/*

*/} + {/* $734.79*/} + {/*

*/} + {/*

*/} + {/* New Add*/} + {/* */} + {/* +324.75*/} + {/* */} + {/*

*/} + {/*
*/} + {/*
*/} + {/**/} + {/* */} + {/* */} + {/* */} + {/* */} + {/* */} + {/**/} + {/*
*/} + {/*
*/} + {/*
*/} + {/*
*/} + {/*
*/} + {/*
*/} +
+ {/* flex space-x-11 */} + {/*
*/} + {/*
*/} + {/* */} + {/*
*/} + {/*
*/} + {/* */} + {/*
*/} + {/*
*/} +
+
+ + + ); +} diff --git a/src/components/MyWallet/WalletItemCard.jsx b/src/components/MyWallet/WalletItemCard.jsx new file mode 100644 index 0000000..00e3db3 --- /dev/null +++ b/src/components/MyWallet/WalletItemCard.jsx @@ -0,0 +1,132 @@ +import React, { useState } from "react"; +import background from "../../assets/images/shape/balance-bg.svg"; +import {PriceFormatter} from "../Helpers/PriceFormatter"; +import {Link} from "react-router-dom"; + +export default function WalletItemCard({walletItem}) { + const [eth] = useState(90); + const [btc] = useState(85); + const [ltc] = useState(20); + return ( +
+
+
+
+

+ . +

+

+ {walletItem.code} +

+
+
+
+ {/*

*/} + {/* 6,572.00*/} + {/*

*/} + {/*

*/} + {/* Total Transactions*/} + {/*

*/} +
+
+
+

+ Current Balance +

+

+ {PriceFormatter(walletItem.amount * 0.01, walletItem.code)} +

+

+ HOLDINGS : {PriceFormatter(walletItem.escrow * 0.01, walletItem.code)} + {/*(11.5%)*/} +

+
+
+ Transfer:'' + + + + + + + Add Credit + + + {/*
*/} + {/*
*/} + {/*
*/} + {/* */} + {/* */} + {/* */} + {/* */} + {/*
*/} + {/*

*/} + {/* {eth}*/} + {/* %*/} + {/*

*/} + {/*
*/} + {/*
*/} + {/*

2.32 ETH

*/} + {/*
*/} + {/*
*/} + {/*
*/} + {/*
*/} + {/*
*/} + {/* */} + {/* */} + {/* */} + {/* */} + {/*
*/} + {/*

*/} + {/* {btc}*/} + {/* %*/} + {/*

*/} + {/*
*/} + {/*
*/} + {/*

1.76 BTC

*/} + {/*
*/} + {/*
*/} + {/*
*/} + {/*
*/} + {/*
*/} + {/* */} + {/* */} + {/* */} + {/* */} + {/*
*/} + {/*

*/} + {/* {ltc}*/} + {/* %*/} + {/*

*/} + {/*
*/} + {/*
*/} + {/*

2.32 LTC

*/} + {/*
*/} + {/*
*/} +
+
+ ); +} -- 2.34.1 From 5dad00096a352bb3cef0a09527f8fa5c3bc6a381 Mon Sep 17 00:00:00 2001 From: victorAnumudu Date: Sun, 9 Jul 2023 03:42:01 +0100 Subject: [PATCH 06/15] check for all necessary variables from API to determine verify link success --- src/components/AuthPages/VerifyLink/index.jsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/AuthPages/VerifyLink/index.jsx b/src/components/AuthPages/VerifyLink/index.jsx index 81b5f53..3ff67fc 100644 --- a/src/components/AuthPages/VerifyLink/index.jsx +++ b/src/components/AuthPages/VerifyLink/index.jsx @@ -86,10 +86,14 @@ export default function VerifyLink() { const verifyRes = await userApi.verifyEmail(code); if (verifyRes.status === 200) { let { data } = verifyRes; - + console.log('TESTING VERIFY',data) if ( data && - data.internal_return >= 0 && + data.internal_return >= 0 && + data.status == 0 && + data.pending_id != '' && + data.pending_uid != '' && + data.username != '' && data.status_text === "Link Verified" ) { setPageLoader(false); -- 2.34.1 From 4224be46bcb1757df8eaf7f52c7fe677f3ebd40f Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Sat, 8 Jul 2023 23:19:23 -0400 Subject: [PATCH 07/15] banner issues --- src/components/AuthPages/AuthRedirect/Redirect.jsx | 6 +++++- src/components/Cards/FamilyActiveJobsCard.jsx | 5 +++-- src/services/UsersService.js | 4 ++++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/components/AuthPages/AuthRedirect/Redirect.jsx b/src/components/AuthPages/AuthRedirect/Redirect.jsx index 4f45717..1f752b4 100644 --- a/src/components/AuthPages/AuthRedirect/Redirect.jsx +++ b/src/components/AuthPages/AuthRedirect/Redirect.jsx @@ -39,8 +39,12 @@ function Redirect() { if (res.status != 200 || res.internal_return < 0) { return; } + + userApi.CompleteOauthLogin(res.data).then( (logRes)=>{ + console.log("OUATH FROm BACKEND",logRes); + } ) // "{"message":"Endpoint not found.","URI":"http:\/\/localhost:9083\/index.php\/en\/wrench\/api\/v1\/authstart"}[]" - alert(JSON.stringify(res.data)); + //alert(JSON.stringify(res.data)); }) .catch((error) => { console.log(error); diff --git a/src/components/Cards/FamilyActiveJobsCard.jsx b/src/components/Cards/FamilyActiveJobsCard.jsx index d652b71..291ed52 100644 --- a/src/components/Cards/FamilyActiveJobsCard.jsx +++ b/src/components/Cards/FamilyActiveJobsCard.jsx @@ -21,7 +21,8 @@ export default function FamilyActiveJobsCard({ datas, hidden = false }) { toast.warn("Remove to Favorite List"); } }; - +//debugger; + const bannerName = datas.banner == null ?'default.jpg':datas.banner; return (
@@ -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" style={{ background: `url(${localImgLoad( - `images/taskbanners/${datas.banner}` + `images/taskbanners/${bannerName}` )}) center / contain no-repeat`, }} > diff --git a/src/services/UsersService.js b/src/services/UsersService.js index 2656169..4134519 100644 --- a/src/services/UsersService.js +++ b/src/services/UsersService.js @@ -10,6 +10,10 @@ class usersService { return this.postAuxEnd("/createuser", reqData); } + CompleteOauthLogin(reqData) { + localStorage.setItem("session_token", ``); + return this.postAuxEnd("/authlogin", reqData); + } CompleteSignUp(reqData) { localStorage.setItem("session_token", ``); return this.postAuxEnd("/completesignuplink", reqData); -- 2.34.1 From 03866d666b03072ba85730db2b1cc620dc1b5e02 Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Sun, 9 Jul 2023 00:17:20 -0400 Subject: [PATCH 08/15] banner bg --- src/assets/images/bg-sky-blue.jpg | Bin 0 -> 6351 bytes src/components/Home/Hero.jsx | 2 +- src/components/MyWallet/WalletItemCard.jsx | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 src/assets/images/bg-sky-blue.jpg diff --git a/src/assets/images/bg-sky-blue.jpg b/src/assets/images/bg-sky-blue.jpg new file mode 100644 index 0000000000000000000000000000000000000000..9f8ca49b959dd68e2817ac35368d81fe8b3b377c GIT binary patch literal 6351 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 literal 0 HcmV?d00001 diff --git a/src/components/Home/Hero.jsx b/src/components/Home/Hero.jsx index 2df46e7..ed6d17f 100644 --- a/src/components/Home/Hero.jsx +++ b/src/components/Home/Hero.jsx @@ -1,7 +1,7 @@ import React, { useState } from "react"; import { Link } from "react-router-dom"; 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 CountDown from "../Helpers/CountDown"; import HomeSliders from "./HomeSliders"; diff --git a/src/components/MyWallet/WalletItemCard.jsx b/src/components/MyWallet/WalletItemCard.jsx index 00e3db3..b81ae63 100644 --- a/src/components/MyWallet/WalletItemCard.jsx +++ b/src/components/MyWallet/WalletItemCard.jsx @@ -1,5 +1,5 @@ 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 {Link} from "react-router-dom"; -- 2.34.1 From d89194f18e47fece950a10894a27c40ab490f7d2 Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Sun, 9 Jul 2023 00:39:38 -0400 Subject: [PATCH 09/15] sty --- src/components/MyWallet/WalletItemCard.jsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/components/MyWallet/WalletItemCard.jsx b/src/components/MyWallet/WalletItemCard.jsx index b81ae63..207b181 100644 --- a/src/components/MyWallet/WalletItemCard.jsx +++ b/src/components/MyWallet/WalletItemCard.jsx @@ -47,9 +47,11 @@ export default function WalletItemCard({walletItem}) {

- Transfer:'' - - + { + walletItem.action_type != 'AC_AD_FD_ONLY' ? + Transfer:'' + } + - Add Credit + Add Credit {/*
*/} -- 2.34.1 From 1f7b310b6fa6a5e0d4166849e167a4a970cdff95 Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Sun, 9 Jul 2023 15:41:49 -0400 Subject: [PATCH 10/15] google login --- src/components/AuthPages/AuthRedirect/Redirect.jsx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/components/AuthPages/AuthRedirect/Redirect.jsx b/src/components/AuthPages/AuthRedirect/Redirect.jsx index 1f752b4..8db1101 100644 --- a/src/components/AuthPages/AuthRedirect/Redirect.jsx +++ b/src/components/AuthPages/AuthRedirect/Redirect.jsx @@ -1,6 +1,8 @@ import React, { useEffect } from 'react'; import { useLocation, useNavigate } from 'react-router-dom'; import usersService from '../../../services/UsersService'; +import {updateUserDetails} from "../../../store/UserDetails"; +import { useDispatch } from "react-redux"; function Redirect() { const location = useLocation(); @@ -40,11 +42,12 @@ function Redirect() { return; } - userApi.CompleteOauthLogin(res.data).then( (logRes)=>{ - console.log("OUATH FROm BACKEND",logRes); - } ) - // "{"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}`); + // localStorage.setItem("session", `${res.data.session}`); + dispatch(updateUserDetails({...res.data, loggedIn:true})); + }) .catch((error) => { console.log(error); -- 2.34.1 From f3edf1d90b2adf25f96e8a2a015c50fe9f303da1 Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Sun, 9 Jul 2023 17:57:05 -0400 Subject: [PATCH 11/15] home banner --- src/components/AuthPages/AuthRedirect/Redirect.jsx | 2 +- src/components/Home/Hero.jsx | 2 +- src/index.css | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/components/AuthPages/AuthRedirect/Redirect.jsx b/src/components/AuthPages/AuthRedirect/Redirect.jsx index 8db1101..9a29dec 100644 --- a/src/components/AuthPages/AuthRedirect/Redirect.jsx +++ b/src/components/AuthPages/AuthRedirect/Redirect.jsx @@ -47,7 +47,7 @@ function Redirect() { localStorage.setItem("session_token", `${res.data.session}`); // localStorage.setItem("session", `${res.data.session}`); dispatch(updateUserDetails({...res.data, loggedIn:true})); - + }) .catch((error) => { console.log(error); diff --git a/src/components/Home/Hero.jsx b/src/components/Home/Hero.jsx index ed6d17f..646c400 100644 --- a/src/components/Home/Hero.jsx +++ b/src/components/Home/Hero.jsx @@ -57,7 +57,7 @@ export default function Hero({ className, bannerList, nextDueTask }) {
{/* countdown */} {nextDueTask?.next_due && Object.keys(nextDueTask.next_due)?.length != 0 && ( -
+

Current Task

diff --git a/src/index.css b/src/index.css index b3e4c4c..85434dc 100644 --- a/src/index.css +++ b/src/index.css @@ -30,7 +30,10 @@ font-size: 42px; font-family: Circular, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif; } - +.back-dark1{ + background-color: #193F5F; + min-width: 280px !important; +} .job-action{ background-color: aliceblue; height: 100px; -- 2.34.1 From 58a10ca6becf434758129b687aadfb597126f220 Mon Sep 17 00:00:00 2001 From: victorAnumudu Date: Sun, 9 Jul 2023 23:14:07 +0100 Subject: [PATCH 12/15] home page hero section adjusted and google login success redirect implemented --- src/components/AuthPages/AuthRedirect/Redirect.jsx | 9 +++++---- src/components/Cards/HomeBannerOffersCard.jsx | 10 +++++----- src/components/Home/Hero.jsx | 6 +++--- src/components/Home/HomeSliders.jsx | 2 +- src/index.css | 7 ------- 5 files changed, 14 insertions(+), 20 deletions(-) diff --git a/src/components/AuthPages/AuthRedirect/Redirect.jsx b/src/components/AuthPages/AuthRedirect/Redirect.jsx index 8db1101..1e6e104 100644 --- a/src/components/AuthPages/AuthRedirect/Redirect.jsx +++ b/src/components/AuthPages/AuthRedirect/Redirect.jsx @@ -8,6 +8,7 @@ function Redirect() { const location = useLocation(); const navigate = useNavigate(); const userApi = new usersService(); + const dispatch = useDispatch() const queryParams = new URLSearchParams(location?.search); const codeResponse = queryParams.get("code"); @@ -37,19 +38,19 @@ function Redirect() { userApi .authStart(reqData) .then((res) => { - console.log(res.data); - if (res.status != 200 || res.internal_return < 0) { + if (res.status != 200) { + navigate('/login', {replace: true}) return; } localStorage.setItem("member_id", `${res.data.member_id}`); localStorage.setItem("uid", `${res.data.uid}`); localStorage.setItem("session_token", `${res.data.session}`); - // localStorage.setItem("session", `${res.data.session}`); dispatch(updateUserDetails({...res.data, loggedIn:true})); - + navigate('/', {replace: true}) }) .catch((error) => { + navigate('/login', {replace: true}) console.log(error); }); },[]) diff --git a/src/components/Cards/HomeBannerOffersCard.jsx b/src/components/Cards/HomeBannerOffersCard.jsx index 4ba0dad..72f4a58 100644 --- a/src/components/Cards/HomeBannerOffersCard.jsx +++ b/src/components/Cards/HomeBannerOffersCard.jsx @@ -17,21 +17,21 @@ export default function HomeBannerOffersCard(props) { return ( -

+
-
-

+
+

{props.itemData.title}

-
+
{props.itemData.description}