Compare commits
34 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ce29e623d4 | |||
| 4fc109926c | |||
| e3399d4b95 | |||
| 4a732ab1e3 | |||
| 0b598e88ba | |||
| 29ce4dd933 | |||
| 17c8573031 | |||
| 368148ef61 | |||
| 3cdea696e8 | |||
| 0c96441f84 | |||
| dff610b749 | |||
| d234bb6747 | |||
| d6b6e34132 | |||
| a0f0a6cf07 | |||
| b3ae0c42c3 | |||
| 5d05da30ca | |||
| 6e97121f96 | |||
| d78c30d9b5 | |||
| 6be6d5cecd | |||
| 997985a45d | |||
| 630b32e78d | |||
| 837d68f3a1 | |||
| 0a2c4b86f3 | |||
| e7a46c25c1 | |||
| 8e9ae8187f | |||
| b25a9c154b | |||
| 66bfe4be82 | |||
| 02773ed1da | |||
| e6c02468de | |||
| 58a75a1c89 | |||
| 8a5b784381 | |||
| 883a98951a | |||
| 7aaae11993 | |||
| ccebe37c34 |
@@ -18,12 +18,12 @@ REACT_APP_USERS_ENDPOINT="https://apigate.lotus.g1.wrenchboard.com/en/wrench/api
|
|||||||
REACT_APP_ENDPOINT_KEY="WRENCH-BOARD-2024"
|
REACT_APP_ENDPOINT_KEY="WRENCH-BOARD-2024"
|
||||||
|
|
||||||
#SOCKETS ENDS
|
#SOCKETS ENDS
|
||||||
REACT_APP_PRIMARY_SOCKET="https://socket-dev.wrenchboard.com"
|
REACT_APP_PRIMARY_SOCKET="https://socket-qa.wrenchboard.com"
|
||||||
|
|
||||||
#"https://devapi.mermsemr.com/en/desktop/api/v2/myfituser"
|
#"https://devapi.mermsemr.com/en/desktop/api/v2/myfituser"
|
||||||
|
|
||||||
REACT_APP_SESSION_EXPIRE_MINUTES=600000
|
REACT_APP_SESSION_EXPIRE_MINUTES=600000
|
||||||
REACT_APP_SESSION_EXPIRE_MINUTES_FAMILY=600000
|
REACT_APP_SESSION_EXPIRE_MINUTES_FAMILY=1800000
|
||||||
REACT_APP_SESSION_EXPIRE_CHECKER=60000
|
REACT_APP_SESSION_EXPIRE_CHECKER=60000
|
||||||
|
|
||||||
REACT_APP_LOGIN_ERROR_TIMEOUT=7000
|
REACT_APP_LOGIN_ERROR_TIMEOUT=7000
|
||||||
@@ -129,4 +129,10 @@ REACT_APP_FAM_GAME_LINK='https://games.wrenchboard.com'
|
|||||||
REACT_APP_CUSTOMTIMER=90
|
REACT_APP_CUSTOMTIMER=90
|
||||||
|
|
||||||
#SHOW OR HIDE MY PAGE LINK ROUTE
|
#SHOW OR HIDE MY PAGE LINK ROUTE
|
||||||
REACT_APP_SHOW_USER_PAGE=1
|
REACT_APP_SHOW_USER_PAGE=1
|
||||||
|
|
||||||
|
# login footer links
|
||||||
|
REACT_APP_HOME_LINK='https://dev-www.wrenchboard.com/'
|
||||||
|
REACT_APP_ABOUT_LINK='https://dev-www.wrenchboard.com/about-us'
|
||||||
|
REACT_APP_CONTACTS_LINK='https://dev-www.wrenchboard.com/contact'
|
||||||
|
REACT_APP_TERMS_LINK='https://dev-www.wrenchboard.com/terms'
|
||||||
+9
-3
@@ -18,12 +18,12 @@ REACT_APP_USERS_ENDPOINT="https://apigate.lotus.g1.wrenchboard.com/en/wrench/api
|
|||||||
REACT_APP_ENDPOINT_KEY="WRENCH-BOARD-2024"
|
REACT_APP_ENDPOINT_KEY="WRENCH-BOARD-2024"
|
||||||
|
|
||||||
#SOCKETS ENDS
|
#SOCKETS ENDS
|
||||||
REACT_APP_PRIMARY_SOCKET="https://socket-dev.wrenchboard.com"
|
REACT_APP_PRIMARY_SOCKET="https://socket-qa.wrenchboard.com"
|
||||||
|
|
||||||
#"https://devapi.mermsemr.com/en/desktop/api/v2/myfituser"
|
#"https://devapi.mermsemr.com/en/desktop/api/v2/myfituser"
|
||||||
|
|
||||||
REACT_APP_SESSION_EXPIRE_MINUTES=600000
|
REACT_APP_SESSION_EXPIRE_MINUTES=600000
|
||||||
REACT_APP_SESSION_EXPIRE_MINUTES_FAMILY=600000
|
REACT_APP_SESSION_EXPIRE_MINUTES_FAMILY=1800000
|
||||||
REACT_APP_SESSION_EXPIRE_CHECKER=60000
|
REACT_APP_SESSION_EXPIRE_CHECKER=60000
|
||||||
|
|
||||||
REACT_APP_LOGIN_ERROR_TIMEOUT=7000
|
REACT_APP_LOGIN_ERROR_TIMEOUT=7000
|
||||||
@@ -98,4 +98,10 @@ REACT_APP_FAM_GAME_LINK='https://games.wrenchboard.com'
|
|||||||
REACT_APP_CUSTOMTIMER=90
|
REACT_APP_CUSTOMTIMER=90
|
||||||
|
|
||||||
#SHOW OR HIDE MY PAGE LINK ROUTE
|
#SHOW OR HIDE MY PAGE LINK ROUTE
|
||||||
REACT_APP_SHOW_USER_PAGE=1
|
REACT_APP_SHOW_USER_PAGE=1
|
||||||
|
|
||||||
|
# login footer links
|
||||||
|
REACT_APP_HOME_LINK='https://dev-www.wrenchboard.com/'
|
||||||
|
REACT_APP_ABOUT_LINK='https://dev-www.wrenchboard.com/about-us'
|
||||||
|
REACT_APP_CONTACTS_LINK='https://dev-www.wrenchboard.com/contact'
|
||||||
|
REACT_APP_TERMS_LINK='https://dev-www.wrenchboard.com/terms'
|
||||||
+8
-2
@@ -23,7 +23,7 @@ REACT_APP_PRIMARY_SOCKET="https://socket.wrenchboard.com"
|
|||||||
#"https://devapi.mermsemr.com/en/desktop/api/v2/myfituser"
|
#"https://devapi.mermsemr.com/en/desktop/api/v2/myfituser"
|
||||||
|
|
||||||
REACT_APP_SESSION_EXPIRE_MINUTES=600000
|
REACT_APP_SESSION_EXPIRE_MINUTES=600000
|
||||||
REACT_APP_SESSION_EXPIRE_MINUTES_FAMILY=600000
|
REACT_APP_SESSION_EXPIRE_MINUTES_FAMILY=1800000
|
||||||
REACT_APP_SESSION_EXPIRE_CHECKER=60000
|
REACT_APP_SESSION_EXPIRE_CHECKER=60000
|
||||||
|
|
||||||
REACT_APP_LOGIN_ERROR_TIMEOUT=7000
|
REACT_APP_LOGIN_ERROR_TIMEOUT=7000
|
||||||
@@ -104,4 +104,10 @@ REACT_APP_FAM_GAME_LINK='https://games.wrenchboard.com'
|
|||||||
REACT_APP_CUSTOMTIMER=90
|
REACT_APP_CUSTOMTIMER=90
|
||||||
|
|
||||||
#SHOW OR HIDE MY PAGE LINK ROUTE
|
#SHOW OR HIDE MY PAGE LINK ROUTE
|
||||||
REACT_APP_SHOW_USER_PAGE=0
|
REACT_APP_SHOW_USER_PAGE=0
|
||||||
|
|
||||||
|
# login footer links
|
||||||
|
REACT_APP_HOME_LINK='https://www.wrenchboard.com/'
|
||||||
|
REACT_APP_ABOUT_LINK='https://www.wrenchboard.com/about-us'
|
||||||
|
REACT_APP_CONTACTS_LINK='https://www.wrenchboard.com/contact'
|
||||||
|
REACT_APP_TERMS_LINK='https://www.wrenchboard.com/terms'
|
||||||
+3
-2
@@ -25,8 +25,9 @@ services:
|
|||||||
- apigate.orion.g1.wrenchboard.com:10.10.33.15
|
- apigate.orion.g1.wrenchboard.com:10.10.33.15
|
||||||
- socket-dev.wrenchboard.com:10.10.33.15
|
- socket-dev.wrenchboard.com:10.10.33.15
|
||||||
- socket.wrenchboard.com:10.10.33.15
|
- socket.wrenchboard.com:10.10.33.15
|
||||||
- apigateway.wrenchboard.app.dev.fluxtra.net:10.20.30.19
|
- media.wrenchboard.com:10.10.33.15
|
||||||
- apigateway.wrenchboard.app.lotus.fluxtra.net:172.31.4.19
|
- www.wrenchboard.com:10.10.33.15
|
||||||
|
- blog.wrenchboard.com:10.10.33.15
|
||||||
environment:
|
environment:
|
||||||
- CHOKIDAR_USEPOLLING=true
|
- CHOKIDAR_USEPOLLING=true
|
||||||
- NODE_ENV=${NODE_ENV:-production}
|
- NODE_ENV=${NODE_ENV:-production}
|
||||||
|
|||||||
Generated
+86
@@ -8,6 +8,7 @@
|
|||||||
"name": "WrenchBoard-Users",
|
"name": "WrenchBoard-Users",
|
||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@fvilers/disable-react-devtools": "^1.3.0",
|
||||||
"@react-oauth/google": "^0.11.0",
|
"@react-oauth/google": "^0.11.0",
|
||||||
"@reduxjs/toolkit": "^1.8.2",
|
"@reduxjs/toolkit": "^1.8.2",
|
||||||
"@tailwindcss/line-clamp": "^0.3.1",
|
"@tailwindcss/line-clamp": "^0.3.1",
|
||||||
@@ -36,6 +37,7 @@
|
|||||||
"react-toastify": "^9.0.1",
|
"react-toastify": "^9.0.1",
|
||||||
"redux": "^4.2.0",
|
"redux": "^4.2.0",
|
||||||
"slick-carousel": "^1.8.1",
|
"slick-carousel": "^1.8.1",
|
||||||
|
"socket.io-client": "^4.4.1",
|
||||||
"web-vitals": "^1.0.1",
|
"web-vitals": "^1.0.1",
|
||||||
"yup": "^1.1.1"
|
"yup": "^1.1.1"
|
||||||
}
|
}
|
||||||
@@ -2302,6 +2304,11 @@
|
|||||||
"url": "https://github.com/sponsors/sindresorhus"
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@fvilers/disable-react-devtools": {
|
||||||
|
"version": "1.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@fvilers/disable-react-devtools/-/disable-react-devtools-1.3.0.tgz",
|
||||||
|
"integrity": "sha512-LbASP6voPkKS5b6OlQhupEDtMeoAakamauqLEFHatkQUTmblNY5nPK7/eSqKBXxExT6uypVPczpTsJjJIrhpOQ=="
|
||||||
|
},
|
||||||
"node_modules/@humanwhocodes/config-array": {
|
"node_modules/@humanwhocodes/config-array": {
|
||||||
"version": "0.11.8",
|
"version": "0.11.8",
|
||||||
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz",
|
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz",
|
||||||
@@ -3717,6 +3724,11 @@
|
|||||||
"@sinonjs/commons": "^1.7.0"
|
"@sinonjs/commons": "^1.7.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@socket.io/component-emitter": {
|
||||||
|
"version": "3.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.2.tgz",
|
||||||
|
"integrity": "sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA=="
|
||||||
|
},
|
||||||
"node_modules/@surma/rollup-plugin-off-main-thread": {
|
"node_modules/@surma/rollup-plugin-off-main-thread": {
|
||||||
"version": "2.2.3",
|
"version": "2.2.3",
|
||||||
"resolved": "https://registry.npmjs.org/@surma/rollup-plugin-off-main-thread/-/rollup-plugin-off-main-thread-2.2.3.tgz",
|
"resolved": "https://registry.npmjs.org/@surma/rollup-plugin-off-main-thread/-/rollup-plugin-off-main-thread-2.2.3.tgz",
|
||||||
@@ -7078,6 +7090,46 @@
|
|||||||
"node": ">= 0.8"
|
"node": ">= 0.8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/engine.io-client": {
|
||||||
|
"version": "6.6.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-6.6.3.tgz",
|
||||||
|
"integrity": "sha512-T0iLjnyNWahNyv/lcjS2y4oE358tVS/SYQNxYXGAJ9/GLgH4VCvOQ/mhTjqU88mLZCQgiG8RIegFHYCdVC+j5w==",
|
||||||
|
"dependencies": {
|
||||||
|
"@socket.io/component-emitter": "~3.1.0",
|
||||||
|
"debug": "~4.3.1",
|
||||||
|
"engine.io-parser": "~5.2.1",
|
||||||
|
"ws": "~8.17.1",
|
||||||
|
"xmlhttprequest-ssl": "~2.1.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/engine.io-client/node_modules/ws": {
|
||||||
|
"version": "8.17.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz",
|
||||||
|
"integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=10.0.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"bufferutil": "^4.0.1",
|
||||||
|
"utf-8-validate": ">=5.0.2"
|
||||||
|
},
|
||||||
|
"peerDependenciesMeta": {
|
||||||
|
"bufferutil": {
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"utf-8-validate": {
|
||||||
|
"optional": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/engine.io-parser": {
|
||||||
|
"version": "5.2.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.2.3.tgz",
|
||||||
|
"integrity": "sha512-HqD3yTBfnBxIrbnM1DoD6Pcq8NECnh8d4As1Qgh0z5Gg3jRRIqijury0CL3ghu/edArpUYiYqQiDUQBIs4np3Q==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=10.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/enhanced-resolve": {
|
"node_modules/enhanced-resolve": {
|
||||||
"version": "5.12.0",
|
"version": "5.12.0",
|
||||||
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.12.0.tgz",
|
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.12.0.tgz",
|
||||||
@@ -16099,6 +16151,32 @@
|
|||||||
"jquery": ">=1.8.0"
|
"jquery": ">=1.8.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/socket.io-client": {
|
||||||
|
"version": "4.8.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-4.8.1.tgz",
|
||||||
|
"integrity": "sha512-hJVXfu3E28NmzGk8o1sHhN3om52tRvwYeidbj7xKy2eIIse5IoKX3USlS6Tqt3BHAtflLIkCQBkzVrEEfWUyYQ==",
|
||||||
|
"dependencies": {
|
||||||
|
"@socket.io/component-emitter": "~3.1.0",
|
||||||
|
"debug": "~4.3.2",
|
||||||
|
"engine.io-client": "~6.6.1",
|
||||||
|
"socket.io-parser": "~4.2.4"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=10.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/socket.io-parser": {
|
||||||
|
"version": "4.2.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.4.tgz",
|
||||||
|
"integrity": "sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew==",
|
||||||
|
"dependencies": {
|
||||||
|
"@socket.io/component-emitter": "~3.1.0",
|
||||||
|
"debug": "~4.3.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=10.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/sockjs": {
|
"node_modules/sockjs": {
|
||||||
"version": "0.3.24",
|
"version": "0.3.24",
|
||||||
"resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.24.tgz",
|
"resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.24.tgz",
|
||||||
@@ -18111,6 +18189,14 @@
|
|||||||
"resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz",
|
||||||
"integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw=="
|
"integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw=="
|
||||||
},
|
},
|
||||||
|
"node_modules/xmlhttprequest-ssl": {
|
||||||
|
"version": "2.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-2.1.2.tgz",
|
||||||
|
"integrity": "sha512-TEU+nJVUUnA4CYJFLvK5X9AOeH4KvDvhIfm0vV1GaQRtchnG0hgK5p8hw/xjv8cunWYCsiPCSDzObPyhEwq3KQ==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.4.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/xtend": {
|
"node_modules/xtend": {
|
||||||
"version": "4.0.2",
|
"version": "4.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
|
||||||
|
|||||||
+1
-3
@@ -19,9 +19,7 @@
|
|||||||
content="Empower families to reward accomplishment, set goals, and encourage kids to understand goals, earning, and the benefit of savings – in one app experience."
|
content="Empower families to reward accomplishment, set goals, and encourage kids to understand goals, earning, and the benefit of savings – in one app experience."
|
||||||
/>
|
/>
|
||||||
<link rel="manifest" href="/manifest.json"/>
|
<link rel="manifest" href="/manifest.json"/>
|
||||||
<script>
|
|
||||||
!function(e,a,t,n,g,c,o){e.GoogleAnalyticsObject=g,e.ga=e.ga||function(){(e.ga.q=e.ga.q||[]).push(arguments)},e.ga.l=1*new Date,c=a.createElement(t),o=a.getElementsByTagName(t)[0],c.async=1,c.src="https://www.google-analytics.com/analytics.js",o.parentNode.insertBefore(c,o)}(window,document,"script",0,"ga"),ga("create","UA-54829827-4","auto"),ga("send","pageview")</script><script defer="defer" src="/static/js/main.787e423f.js"></script><link href="/static/css/main.418eaf65.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body><script>var LHC_API=LHC_API||{};LHC_API.args={mode:"widget",lhc_base_url:"//chat.live.wrenchboard.com/",wheight:450,wwidth:350,pheight:520,pwidth:500,leaveamessage:!0,check_messages:!1},function(){var e=document.createElement("script");e.type="text/javascript",e.setAttribute("crossorigin","anonymous"),e.async=!0;var t=new Date;e.src="//chat.live.wrenchboard.com/design/defaulttheme/js/widgetv2/index.js?"+t.getFullYear()+t.getMonth()+t.getDate();var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(e,a)}()
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
|
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
|
||||||
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
|
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
|
||||||
|
|||||||
+74
-91
@@ -1,86 +1,87 @@
|
|||||||
import { Route, Routes } from "react-router-dom";
|
import { Route, Routes } from "react-router-dom";
|
||||||
import { lazy } from "react";
|
import { lazy } from "react";
|
||||||
|
|
||||||
import LoginLandingPage from './views/LoginLandingPage'
|
|
||||||
import LoginPage from "./views/LoginPage";
|
|
||||||
import HomePages from "./views/HomePages";
|
|
||||||
import SocketConnection from "./middleware/SocketConnection";
|
import SocketConnection from "./middleware/SocketConnection";
|
||||||
|
|
||||||
|
// AUTH PAGES
|
||||||
|
import LoginLandingPage from './views/LoginLandingPage';
|
||||||
|
import LoginPage from "./views/LoginPage";
|
||||||
|
import LoginPageTwo from "./views/LoginPageTwo";
|
||||||
|
import FourZeroFour from "./components/FourZeroFour";
|
||||||
|
import AppDownloadPage from "./views/AppDownloadPage";
|
||||||
|
import AppleRedirectPage from "./views/AppleRedirectPage";
|
||||||
|
import AuthRedirect from "./views/AuthRedirect";
|
||||||
|
import ForgotPasswordPages from "./views/ForgotPasswordPages";
|
||||||
|
import ForgotPasswordPagesTwo from "./views/ForgotPasswordPagesTwo";
|
||||||
|
import LndPage from "./views/LndPage";
|
||||||
|
import SignupPage from "./views/SignupPage";
|
||||||
|
import SignupPageTwo from "./views/SignupPageTwo";
|
||||||
|
import UpdatePasswordPages from "./views/UpdatePasswordPages";
|
||||||
|
import UpdatePasswordPagesTwo from "./views/UpdatePasswordPagesTwo";
|
||||||
|
import VerifyLinkPages from "./views/VerifyLinkPages";
|
||||||
|
import VerifyLinkPagesTwo from "./views/VerifyLinkPagesTwo";
|
||||||
|
import VerifyPasswordPages from "./views/VerifyPasswordPages";
|
||||||
|
import VerifyPasswordPagesTwo from "./views/VerifyPasswordPagesTwo";
|
||||||
|
import VerifyYouPages from "./views/VerifyYouPages";
|
||||||
|
import VerifyYouPagesTwo from "./views/VerifyYouPagesTwo";
|
||||||
|
import FacebookRedirect from "./views/FacebookRedirect";
|
||||||
|
import PromoPage from "./views/PromoPage";
|
||||||
|
import PromoRefer from './views/PromoRefer';
|
||||||
|
import InviteRefer from './views/InviteRefer';
|
||||||
|
import MyRefer from './views/MyRefer';
|
||||||
|
|
||||||
const FourZeroFour = lazy(() => import("./components/FourZeroFour"));
|
|
||||||
const ScrollToTop = lazy(() => import("./components/Helpers/ScrollToTop"));
|
|
||||||
const StartJob = lazy(() => import("./components/MyJobs/StartJob"));
|
|
||||||
const Notification = lazy(() => import("./components/Notification"));
|
|
||||||
const AuthRoute = lazy(() => import("./middleware/AuthRoute"));
|
|
||||||
const AppDownloadPage = lazy(() => import("./views/AppDownloadPage"));
|
|
||||||
const AppleRedirectPage = lazy(() => import("./views/AppleRedirectPage"));
|
|
||||||
const AuthProfilePage = lazy(() => import("./views/AuthProfilePage"));
|
|
||||||
const AuthRedirect = lazy(() => import("./views/AuthRedirect"));
|
|
||||||
const BlogPage = lazy(() => import("./views/BlogPage"));
|
|
||||||
const CalendarPage = lazy(() => import("./views/CalendarPage"));
|
|
||||||
const CollectionItemPage = lazy(() => import("./views/CollectionItemPage"));
|
|
||||||
const FacebookRedirect = lazy(() => import("./views/FacebookRedirect"));
|
|
||||||
const FamilyManagePage = lazy(() => import("./views/FamilyManagePage"));
|
|
||||||
const FamilyMarketPage = lazy(() => import("./views/FamilyMarketPage"));
|
|
||||||
|
|
||||||
const ForgotPasswordPages = lazy(()=> import("./views/ForgotPasswordPages"));
|
import HomePages from "./views/HomePages"
|
||||||
const ForgotPasswordPagesTwo = lazy(()=> import("./views/ForgotPasswordPagesTwo"));
|
import ScrollToTop from "./components/Helpers/ScrollToTop"
|
||||||
const HistoryPage = lazy(()=> import("./views/HistoryPage"));
|
import StartJob from "./components/MyJobs/StartJob"
|
||||||
const JobGroupsPage = lazy(()=> import("./views/JobGroupsPage"));
|
import Notification from "./components/Notification"
|
||||||
const LndPage = lazy(()=> import("./views/LndPage"));
|
import AuthRoute from "./middleware/AuthRoute"
|
||||||
const LoginPageTwo = lazy(()=> import("./views/LoginPageTwo"));
|
import AuthProfilePage from "./views/AuthProfilePage"
|
||||||
const ManageActiveJobs = lazy(()=> import("./views/ManageActiveJobs"));
|
import BlogPage from "./views/BlogPage"
|
||||||
const ManageInterestOfferPage = lazy(()=> import("./views/ManageInterestOfferPage"));
|
import FamilyManagePage from "./views/FamilyManagePage"
|
||||||
const MarketPlacePage = lazy(()=> import("./views/MarketPlacePage"));
|
import FamilyMarketPage from "./views/FamilyMarketPage"
|
||||||
const MyActiveJobsPage = lazy(()=> import("./views/MyActiveJobsPage"));
|
|
||||||
const MyCouponPage = lazy(()=> import("./views/MyCouponPage"));
|
import HistoryPage from "./views/HistoryPage"
|
||||||
const MyJobsPage = lazy(()=> import("./views/MyJobsPage"));
|
import JobGroupsPage from "./views/JobGroupsPage"
|
||||||
const MyOffersPage = lazy(()=> import("./views/MyOffersPage"));
|
import ManageActiveJobs from "./views/ManageActiveJobs"
|
||||||
const MyPastDueJobsPage = lazy(()=> import("./views/MyPastDueJobsPage"));
|
import ManageInterestOfferPage from "./views/ManageInterestOfferPage"
|
||||||
const MyReviewDueJobsPage = lazy(()=> import("./views/MyReviewDueJobsPage"));
|
import MarketPlacePage from "./views/MarketPlacePage"
|
||||||
const MyTaskPage = lazy(()=> import("./views/MyTaskPage"));
|
import MyActiveJobsPage from "./views/MyActiveJobsPage"
|
||||||
const MyWaitingJobsPage = lazy(()=> import("./views/MyWaitingJobsPage"));
|
import MyCouponPage from "./views/MyCouponPage"
|
||||||
const MyWalletPage = lazy(()=> import("./views/MyWalletPage"));
|
import MyJobsPage from "./views/MyJobsPage"
|
||||||
const OffersInterestPage = lazy(()=> import("./views/OffersInterestPage"));
|
import MyOffersPage from "./views/MyOffersPage"
|
||||||
const ReferralPage = lazy(()=> import("./views/ReferralPage"));
|
import MyPastDueJobsPage from "./views/MyPastDueJobsPage"
|
||||||
const RemindersPage = lazy(()=> import("./views/RemindersPage"));
|
import MyReviewDueJobsPage from "./views/MyReviewDueJobsPage"
|
||||||
const ResourcePage = lazy(()=> import("./views/ResourcePage"));
|
import MyTaskPage from "./views/MyTaskPage"
|
||||||
const SavedPage = lazy(()=> import("./views/SavedPage"));
|
import MyWaitingJobsPage from "./views/MyWaitingJobsPage"
|
||||||
const SellPage = lazy(()=> import("./views/SellPage"));
|
import MyWalletPage from "./views/MyWalletPage"
|
||||||
const SettingsPage = lazy(()=> import("./views/SettingsPage"));
|
import OffersInterestPage from "./views/OffersInterestPage"
|
||||||
const SignupPage = lazy(()=> import("./views/SignupPage"));
|
import ReferralPage from "./views/ReferralPage"
|
||||||
const SignupPageTwo = lazy(()=> import("./views/SignupPageTwo"));
|
import RemindersPage from "./views/RemindersPage"
|
||||||
const TrackingPage = lazy(()=> import("./views/TrackingPage"));
|
import ResourcePage from "./views/ResourcePage"
|
||||||
const UpdatePasswordPages = lazy(()=> import("./views/UpdatePasswordPages"));
|
import SettingsPage from "./views/SettingsPage"
|
||||||
const UpdatePasswordPagesTwo = lazy(()=> import("./views/UpdatePasswordPagesTwo"));
|
import TrackingPage from "./views/TrackingPage"
|
||||||
const UploadProductPage = lazy(()=> import("./views/UploadProductPage"));
|
import UploadProductPage from "./views/UploadProductPage"
|
||||||
const UserProfilePage = lazy(()=> import("./views/UserProfilePage"));
|
import UserProfilePage from "./views/UserProfilePage"
|
||||||
const VerifyLinkPages = lazy(()=> import("./views/VerifyLinkPages"));
|
import YourPages from "./views/YourPage_"
|
||||||
const VerifyLinkPagesTwo = lazy(()=> import("./views/VerifyLinkPagesTwo"));
|
import ParentWaitingPage from "./views/ParentWaitingPage"
|
||||||
const VerifyPasswordPages = lazy(()=> import("./views/VerifyPasswordPages"));
|
import FamilyPendingOfferPage from "./views/FamilyPendingOfferPage"
|
||||||
const VerifyPasswordPagesTwo = lazy(()=> import("./views/VerifyPasswordPagesTwo"));
|
import FamBlogPage from "./views/FamBlogPage"
|
||||||
const VerifyYouPages = lazy(()=> import("./views/VerifyYouPages"));
|
import FamAIQuestionPage from "./views/FamAIQuestionPage"
|
||||||
const VerifyYouPagesTwo = lazy(()=> import("./views/VerifyYouPagesTwo"));
|
import FamMyFilesPage from "./views/FamMyFilesPage"
|
||||||
const YourPages = lazy(()=> import("./views/YourPage_"));
|
import FamWorkInProgressPage from "./views/FamWorkInProgressPage"
|
||||||
const ParentWaitingPage = lazy(()=> import("./views/ParentWaitingPage"));
|
import MyPastDueTasksPage from "./views/MyPastDueTasksPage"
|
||||||
const FamilyPendingOfferPage = lazy(()=> import("./views/FamilyPendingOfferPage"));
|
import FamilyWalletPage from "./views/FamilyWalletPage"
|
||||||
const FamBlogPage = lazy(()=> import("./views/FamBlogPage"));
|
import LearnMorePage from "./views/LearnMorePage"
|
||||||
const FamAIQuestionPage = lazy(()=> import("./views/FamAIQuestionPage"));
|
import FamGamesPage from "./views/FamGamesPage"
|
||||||
const FamMyFilesPage = lazy(()=> import("./views/FamMyFilesPage"));
|
import FamilyRoutesPage from "./views/FamilyRoutesPage"
|
||||||
const FamWorkInProgressPage = lazy(()=> import("./views/FamWorkInProgressPage"));
|
|
||||||
const MyPastDueTasksPage = lazy(()=> import("./views/MyPastDueTasksPage"));
|
|
||||||
const FamilyWalletPage = lazy(()=> import("./views/FamilyWalletPage"));
|
|
||||||
const LearnMorePage = lazy(()=> import("./views/LearnMorePage"));
|
|
||||||
const FamGamesPage = lazy(()=> import("./views/FamGamesPage"));
|
|
||||||
const FamilyRoutesPage = lazy(()=> import("./views/FamilyRoutesPage"));
|
|
||||||
const PromoPage = lazy(()=> import("./views/PromoPage"));
|
|
||||||
|
|
||||||
export default function Routers() {
|
export default function Routers() {
|
||||||
return (
|
return (
|
||||||
<ScrollToTop>
|
<ScrollToTop>
|
||||||
<Routes>
|
<Routes>
|
||||||
{/* guest routes */}
|
{/* guest routes */}
|
||||||
{process.env.REACT_APP_NEW_LOGIN_LAYOUT == 1 ? (
|
{Number(process.env.REACT_APP_NEW_LOGIN_LAYOUT) === 1 ? (
|
||||||
<>
|
<>
|
||||||
<Route exact path="/login" element={<LoginLandingPage />} />
|
<Route exact path="/login" element={<LoginLandingPage />} />
|
||||||
<Route exact path="/login/:type" element={<LoginPageTwo />} />
|
<Route exact path="/login/:type" element={<LoginPageTwo />} />
|
||||||
@@ -99,8 +100,10 @@ export default function Routers() {
|
|||||||
<Route path="/complereset" element={<VerifyPasswordPagesTwo />} />
|
<Route path="/complereset" element={<VerifyPasswordPagesTwo />} />
|
||||||
<Route exact path="/outmessage" element={<VerifyYouPagesTwo />} />
|
<Route exact path="/outmessage" element={<VerifyYouPagesTwo />} />
|
||||||
<Route exact path="/eoffer" element={<LoginPageTwo />} />
|
<Route exact path="/eoffer" element={<LoginPageTwo />} />
|
||||||
<Route exact path="/invite" element={<LoginPageTwo />} />
|
|
||||||
<Route exact path="/promo/:name/:id" element={<PromoPage />} />
|
<Route exact path="/promo/:name/:id" element={<PromoPage />} />
|
||||||
|
<Route exact path="/promoref" element={<PromoRefer />} />
|
||||||
|
<Route exact path="/invite" element={<InviteRefer />} />
|
||||||
|
<Route exact path="/myrefer/:refer_link" element={<MyRefer />} />
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
@@ -133,14 +136,8 @@ export default function Routers() {
|
|||||||
<Route element={<SocketConnection />}>
|
<Route element={<SocketConnection />}>
|
||||||
<Route element={<AuthRoute />}>
|
<Route element={<AuthRoute />}>
|
||||||
<Route exact path="/" element={<HomePages />} />
|
<Route exact path="/" element={<HomePages />} />
|
||||||
{/* <Route exact path="/active-bids" element={<AcitveBidsPage />} />
|
|
||||||
<Route exact path="/notification" element={<Notification />} />
|
|
||||||
<Route exact path="/market-place" element={<MarketPlacePage />} />
|
|
||||||
<Route exact path="/shop-details" element={<ShopDetailsPage />} />
|
|
||||||
<Route exact path="/my-collection" element={<MyCollection />} />*/}
|
|
||||||
<Route exact path="/reminders" element={<RemindersPage />} />
|
<Route exact path="/reminders" element={<RemindersPage />} />
|
||||||
<Route exact path="/tracking" element={<TrackingPage />} />
|
<Route exact path="/tracking" element={<TrackingPage />} />
|
||||||
<Route exact path="/calendar" element={<CalendarPage />} />
|
|
||||||
<Route exact path="/resources" element={<ResourcePage />} />
|
<Route exact path="/resources" element={<ResourcePage />} />
|
||||||
<Route exact path="/my-wallet/*" element={<MyWalletPage />} />
|
<Route exact path="/my-wallet/*" element={<MyWalletPage />} />
|
||||||
<Route exact path="/family-wallet" element={<FamilyWalletPage />} />
|
<Route exact path="/family-wallet" element={<FamilyWalletPage />} />
|
||||||
@@ -163,7 +160,6 @@ export default function Routers() {
|
|||||||
<Route exact path="/notification" element={<Notification />} />
|
<Route exact path="/notification" element={<Notification />} />
|
||||||
<Route exact path="/mytask" element={<MyTaskPage />} />
|
<Route exact path="/mytask" element={<MyTaskPage />} />
|
||||||
<Route exact path="/myjobs" element={<MyJobsPage />} />
|
<Route exact path="/myjobs" element={<MyJobsPage />} />
|
||||||
{/* <Route exact path="/add-job" element={<AddJobPage />} /> */}
|
|
||||||
<Route exact path="/my-active-jobs" element={<MyActiveJobsPage />} />
|
<Route exact path="/my-active-jobs" element={<MyActiveJobsPage />} />
|
||||||
<Route
|
<Route
|
||||||
exact
|
exact
|
||||||
@@ -177,10 +173,6 @@ export default function Routers() {
|
|||||||
path="/my-review-jobs"
|
path="/my-review-jobs"
|
||||||
element={<MyReviewDueJobsPage />}
|
element={<MyReviewDueJobsPage />}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{/* <Route exact path='/acc-family' element={<FamilyAccPage />} />
|
|
||||||
<Route exact path="/acc-family/activities" element={<FamilyActivitiesPage />} />
|
|
||||||
<Route exact path="/acc-family/familysettings" element={<FamilySettingsPage />} /> */}
|
|
||||||
<Route path='/acc-family/*' element={<FamilyRoutesPage />} />
|
<Route path='/acc-family/*' element={<FamilyRoutesPage />} />
|
||||||
|
|
||||||
<Route exact path="/manage-family" element={<FamilyManagePage />} />
|
<Route exact path="/manage-family" element={<FamilyManagePage />} />
|
||||||
@@ -202,17 +194,8 @@ export default function Routers() {
|
|||||||
path="/manage-offer"
|
path="/manage-offer"
|
||||||
element={<ManageInterestOfferPage />}
|
element={<ManageInterestOfferPage />}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Route
|
|
||||||
exact
|
|
||||||
path="/my-collection/collection-item"
|
|
||||||
element={<CollectionItemPage />}
|
|
||||||
/>
|
|
||||||
<Route exact path="/sell" element={<SellPage />} />
|
|
||||||
<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="/learnmore" element={<LearnMorePage />} />
|
||||||
{/*<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 />} />
|
||||||
<Route exact path="/user-profile" element={<UserProfilePage />} />
|
<Route exact path="/user-profile" element={<UserProfilePage />} />
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ function AddJob({ popUpHandler, categories }) {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
const res = await ApiCall.jobManagerCreateJob(reqData);
|
const res = await ApiCall.jobManagerCreateJob(reqData);
|
||||||
if (res.data.internal_return < 1) {
|
if (res?.data?.internal_return < 1) {
|
||||||
setRequestStatus({
|
setRequestStatus({
|
||||||
loading: false,
|
loading: false,
|
||||||
status: false,
|
status: false,
|
||||||
@@ -75,7 +75,7 @@ function AddJob({ popUpHandler, categories }) {
|
|||||||
// For form initial values
|
// For form initial values
|
||||||
const initialValues = {
|
const initialValues = {
|
||||||
// initial values for formik
|
// initial values for formik
|
||||||
country: walletDetails.data.length === 1 ? walletDetails.data[0].country : '',
|
country: walletDetails?.data?.length === 1 ? walletDetails.data[0].country : '',
|
||||||
price: "",
|
price: "",
|
||||||
title: "",
|
title: "",
|
||||||
description: "",
|
description: "",
|
||||||
@@ -117,18 +117,18 @@ function AddJob({ popUpHandler, categories }) {
|
|||||||
className={`input-field p-2 mt-3 rounded-full placeholder:text-base text-dark-gray w-full h-[42px] bg-slate-100 focus:ring-0 focus:outline-none border`}
|
className={`input-field p-2 mt-3 rounded-full placeholder:text-base text-dark-gray w-full h-[42px] bg-slate-100 focus:ring-0 focus:outline-none border`}
|
||||||
onChange={props.handleChange}
|
onChange={props.handleChange}
|
||||||
onBlur={props.handleBlur}
|
onBlur={props.handleBlur}
|
||||||
disabled={walletDetails.data.length === 1}
|
disabled={walletDetails?.data?.length === 1}
|
||||||
>
|
>
|
||||||
{walletDetails?.loading ? (
|
{walletDetails?.loading ? (
|
||||||
<option className="text-slate-500 text-lg" value="">
|
<option className="text-slate-500 text-lg" value="">
|
||||||
Loading...
|
Loading...
|
||||||
</option>
|
</option>
|
||||||
) : walletDetails.data.length > 1 ? (
|
) : walletDetails?.data?.length > 1 ? (
|
||||||
<>
|
<>
|
||||||
<option className="text-slate-500 text-lg" value="">
|
<option className="text-slate-500 text-lg" value="">
|
||||||
Select a currency
|
Select a currency
|
||||||
</option>
|
</option>
|
||||||
{walletDetails.data?.map((item, index) => (
|
{walletDetails?.data?.map((item, index) => (
|
||||||
<option
|
<option
|
||||||
key={index}
|
key={index}
|
||||||
className="text-slate-500 text-lg"
|
className="text-slate-500 text-lg"
|
||||||
@@ -138,9 +138,9 @@ function AddJob({ popUpHandler, categories }) {
|
|||||||
</option>
|
</option>
|
||||||
))}
|
))}
|
||||||
</>
|
</>
|
||||||
) : walletDetails.data.length === 1 ?
|
) : walletDetails?.data?.length === 1 ?
|
||||||
<>
|
<>
|
||||||
{walletDetails.data?.map((item, index) => (
|
{walletDetails?.data?.map((item, index) => (
|
||||||
<option
|
<option
|
||||||
key={index}
|
key={index}
|
||||||
className="text-slate-500 text-lg"
|
className="text-slate-500 text-lg"
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import WrenchBoard from "../../assets/images/wrenchboard-logo-text.png";
|
|||||||
|
|
||||||
import DarkModeContext from "../Contexts/DarkModeContext";
|
import DarkModeContext from "../Contexts/DarkModeContext";
|
||||||
|
|
||||||
export default function LoginLayout({ slogan, children }) {
|
export default function AuthLayout2({ slogan, children }) {
|
||||||
// const bgImg = localImgLoad("images/left-wrenchboard.jpg");
|
// const bgImg = localImgLoad("images/left-wrenchboard.jpg");
|
||||||
const bgImgNig = localImgLoad("images/wrench-home-back-nigeria.jpg");
|
const bgImgNig = localImgLoad("images/wrench-home-back-nigeria.jpg");
|
||||||
const bgImgCom = localImgLoad("images/wrench-home-back-common.jpg");
|
const bgImgCom = localImgLoad("images/wrench-home-back-common.jpg");
|
||||||
@@ -47,8 +47,16 @@ export default function LoginLayout({ slogan, children }) {
|
|||||||
<div className="w-full flex flex-col md:flex-row justify-center items-center px-10 py-2">
|
<div className="w-full flex flex-col md:flex-row justify-center items-center px-10 py-2">
|
||||||
<div className="flex justify-center items-center">
|
<div className="flex justify-center items-center">
|
||||||
<div className="flex items-center">
|
<div className="flex items-center">
|
||||||
|
<a
|
||||||
|
href={process.env.REACT_APP_HOME_LINK}
|
||||||
|
className='text-[#a1a5b7] text-[15px] px-2 font-medium hover:text-[#009ef7]'
|
||||||
|
target="_blank"
|
||||||
|
rel="noreferrer"
|
||||||
|
>
|
||||||
|
Home
|
||||||
|
</a>
|
||||||
<a
|
<a
|
||||||
href="https://www.wrenchboard.com/about-us"
|
href={process.env.REACT_APP_ABOUT_LINK}
|
||||||
className="text-[#a1a5b7] text-[15px] px-2 font-medium hover:text-[#009ef7]"
|
className="text-[#a1a5b7] text-[15px] px-2 font-medium hover:text-[#009ef7]"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noreferrer"
|
rel="noreferrer"
|
||||||
@@ -56,15 +64,16 @@ export default function LoginLayout({ slogan, children }) {
|
|||||||
About
|
About
|
||||||
</a>
|
</a>
|
||||||
<a
|
<a
|
||||||
href="https://www.wrenchboard.com/service"
|
// href="https://www.wrenchboard.com/service"
|
||||||
|
href={process.env.REACT_APP_TERMS_LINK}
|
||||||
className="text-[#a1a5b7] text-[15px] px-2 font-medium hover:text-[#009ef7]"
|
className="text-[#a1a5b7] text-[15px] px-2 font-medium hover:text-[#009ef7]"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noreferrer"
|
rel="noreferrer"
|
||||||
>
|
>
|
||||||
Services
|
Terms
|
||||||
</a>
|
</a>
|
||||||
<a
|
<a
|
||||||
href="https://www.wrenchboard.com/contact"
|
href={process.env.REACT_APP_CONTACTS_LINK}
|
||||||
className="text-[#a1a5b7] text-[15px] px-2 font-medium hover:text-[#009ef7]"
|
className="text-[#a1a5b7] text-[15px] px-2 font-medium hover:text-[#009ef7]"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noreferrer"
|
rel="noreferrer"
|
||||||
|
|||||||
@@ -104,6 +104,12 @@ export default function LoginLanding() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{/* <div className="login-links mt-10 flex justify-center text-gray-400 divide-x-4">
|
||||||
|
<a className='text-sm font-bold px-5' href={process.env.REACT_APP_HOME_LINK}>Home</a>
|
||||||
|
<a className='text-sm font-bold px-5' href={process.env.REACT_APP_ABOUT_LINK}>About</a>
|
||||||
|
<a className='text-sm font-bold px-5' href={process.env.REACT_APP_CONTACTS_LINK}>Contact</a>
|
||||||
|
<a className='text-sm font-bold px-5' href={process.env.REACT_APP_TERMS_LINK}>Terms</a>
|
||||||
|
</div> */}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -526,8 +526,8 @@ export default function Login() {
|
|||||||
)
|
)
|
||||||
// END of family login compoenent
|
// END of family login compoenent
|
||||||
}
|
}
|
||||||
<div className='w-full text-center'>
|
<div className='mt-4 w-full flex justify-center items-center text-center'>
|
||||||
<Link className='text-center block font-semibold text-lg pt-3 tracking-wide' to='/login'>Return</Link>
|
<Link className='px-4 py-2 rounded-full text-xl text-white bg-[#4687ba] hover:bg-[#009ef7] transition-all duration-300 items-center text-[15px]' to='/login'>Return</Link>
|
||||||
</div>
|
</div>
|
||||||
{/* END of login component */}
|
{/* END of login component */}
|
||||||
|
|
||||||
@@ -621,7 +621,7 @@ const BrandBtn = ({
|
|||||||
className="w-full border border-light-purple rounded-[0.475rem] h-[48px] flex justify-center bg-[#FAFAFA] hover:bg-[#eff2f5] hover:text-[#7e8299] transition duration-300 items-center font-medium cursor-pointer"
|
className="w-full border border-light-purple rounded-[0.475rem] h-[48px] flex justify-center bg-[#FAFAFA] hover:bg-[#eff2f5] hover:text-[#7e8299] transition duration-300 items-center font-medium cursor-pointer"
|
||||||
>
|
>
|
||||||
<img className="mr-3 h-6" src={imgSrc} alt="logo-icon(s)" />
|
<img className="mr-3 h-6" src={imgSrc} alt="logo-icon(s)" />
|
||||||
<span className="text-lg text-thin-light-gray font-normal text-[15px]">
|
<span className="text-thin-light-gray font-normal text-sm">
|
||||||
Continue with {brand}
|
Continue with {brand}
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
@@ -632,7 +632,7 @@ const BrandBtn = ({
|
|||||||
className="w-full border border-light-purple rounded-[0.475rem] h-[48px] flex justify-center bg-[#FAFAFA] hover:bg-[#eff2f5] hover:text-[#7e8299] transition duration-300 items-center font-medium cursor-pointer"
|
className="w-full border border-light-purple rounded-[0.475rem] h-[48px] flex justify-center bg-[#FAFAFA] hover:bg-[#eff2f5] hover:text-[#7e8299] transition duration-300 items-center font-medium cursor-pointer"
|
||||||
>
|
>
|
||||||
<img className="mr-3 h-6" src={imgSrc} alt="logo-icon(s)" />
|
<img className="mr-3 h-6" src={imgSrc} alt="logo-icon(s)" />
|
||||||
<span className="text-lg text-thin-light-gray font-normal text-[15px]">
|
<span className="text-thin-light-gray font-normal text-sm">
|
||||||
Continue with {brand}
|
Continue with {brand}
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -8,7 +8,13 @@ import AuthLayout from "../AuthLayout2";
|
|||||||
import GoogleDownload from '../../../assets/images/download/andriod.jpg'
|
import GoogleDownload from '../../../assets/images/download/andriod.jpg'
|
||||||
import IOSDownload from '../../../assets/images/download/apple.jpg'
|
import IOSDownload from '../../../assets/images/download/apple.jpg'
|
||||||
|
|
||||||
export default function SignUp() {
|
/* Note
|
||||||
|
The Props in this component
|
||||||
|
1. refer_link holds the value to be sent as the referral code
|
||||||
|
2. details holds the value of the person either referred via invite or promo
|
||||||
|
*/
|
||||||
|
|
||||||
|
export default function SignUp({refer_link, details}) {
|
||||||
const location = useLocation();
|
const location = useLocation();
|
||||||
|
|
||||||
// eslint-disable-next-line no-restricted-globals
|
// eslint-disable-next-line no-restricted-globals
|
||||||
@@ -28,9 +34,9 @@ export default function SignUp() {
|
|||||||
|
|
||||||
const [formData, setFormData] = useState({
|
const [formData, setFormData] = useState({
|
||||||
country: country ? country : "",
|
country: country ? country : "",
|
||||||
first_name: "",
|
first_name: details ? details.firstname : "",
|
||||||
last_name: "",
|
last_name: details ? details.lastname : "",
|
||||||
email: "",
|
email: details ? details.email : "",
|
||||||
password: "",
|
password: "",
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -104,6 +110,7 @@ export default function SignUp() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setSignUpLoading(true);
|
setSignUpLoading(true);
|
||||||
|
let referral_link = refer_link ? {refer_link} : {} // FOR USER COMING FROM REFERRAL PROCESS
|
||||||
const reqData = {
|
const reqData = {
|
||||||
country: country,
|
country: country,
|
||||||
firstname: first_name,
|
firstname: first_name,
|
||||||
@@ -113,6 +120,7 @@ export default function SignUp() {
|
|||||||
password: password,
|
password: password,
|
||||||
terms: 1,
|
terms: 1,
|
||||||
news: 1,
|
news: 1,
|
||||||
|
...referral_link
|
||||||
};
|
};
|
||||||
|
|
||||||
const res = await userApi.CreateUser(reqData);
|
const res = await userApi.CreateUser(reqData);
|
||||||
@@ -202,6 +210,7 @@ export default function SignUp() {
|
|||||||
type="text"
|
type="text"
|
||||||
value={formData.first_name}
|
value={formData.first_name}
|
||||||
inputHandler={handleInputChange}
|
inputHandler={handleInputChange}
|
||||||
|
disable={details ? true : false}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="input-item flex-1">
|
<div className="input-item flex-1">
|
||||||
@@ -213,6 +222,7 @@ export default function SignUp() {
|
|||||||
type="text"
|
type="text"
|
||||||
value={formData.last_name}
|
value={formData.last_name}
|
||||||
inputHandler={handleInputChange}
|
inputHandler={handleInputChange}
|
||||||
|
disable={details ? true : false}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -225,6 +235,7 @@ export default function SignUp() {
|
|||||||
type="email"
|
type="email"
|
||||||
value={formData.email}
|
value={formData.email}
|
||||||
inputHandler={handleInputChange}
|
inputHandler={handleInputChange}
|
||||||
|
disable={details ? true : false}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="input-item mb-4">
|
<div className="input-item mb-4">
|
||||||
@@ -271,16 +282,17 @@ export default function SignUp() {
|
|||||||
)}
|
)}
|
||||||
</button>
|
</button>
|
||||||
<span
|
<span
|
||||||
onClick={rememberMe}
|
// onClick={rememberMe}
|
||||||
className="cursor-default text-gray-400 font-medium text-[16.25px] leading-[24.375px] group-checked:text-white transition-all duration-200 group-checked:cursor-default"
|
className="cursor-default text-gray-400 font-medium text-[16.25px] leading-[24.375px] group-checked:text-white transition-all duration-200 group-checked:cursor-default"
|
||||||
>
|
>
|
||||||
I agree with all
|
I agree with all
|
||||||
<Link
|
<a
|
||||||
href="#"
|
target='_blank'
|
||||||
|
href={process.env.REACT_APP_TERMS_LINK}
|
||||||
className="font-semibold text-[#4687ba] hover:text-[#009ef7] transition mx-1 inline-block"
|
className="font-semibold text-[#4687ba] hover:text-[#009ef7] transition mx-1 inline-block"
|
||||||
>
|
>
|
||||||
terms and condition
|
terms and condition
|
||||||
</Link>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -67,6 +67,7 @@ export default function SocketIOContextProvider({children}) {
|
|||||||
let {message} = data
|
let {message} = data
|
||||||
if(message.action == "REFRESH_OFFER" && message.family_uid == user_uid && message.audience == "MEMBER"){ // for refreshing child account when parent assigns a job
|
if(message.action == "REFRESH_OFFER" && message.family_uid == user_uid && message.audience == "MEMBER"){ // for refreshing child account when parent assigns a job
|
||||||
dispatch(tableReload({type:'FAMILYOFFERLIST'})) // dispatches to update family pending/offer list on family side
|
dispatch(tableReload({type:'FAMILYOFFERLIST'})) // dispatches to update family pending/offer list on family side
|
||||||
|
dispatch(tableReload({ type: "FAMILYBANNERSLIST" })) // dispatches to update family banner list on family side
|
||||||
}
|
}
|
||||||
if(message.action == "REFRESH_TASK" && message.audience == "PARENT"){ // for refreshing parent account when child accepts or rejects a job
|
if(message.action == "REFRESH_TASK" && message.audience == "PARENT"){ // for refreshing parent account when child accepts or rejects a job
|
||||||
dispatch(tableReload({type:'PARENTFAMILYTASKLIST'})) // dispatches to update parent family task list on parent side
|
dispatch(tableReload({type:'PARENTFAMILYTASKLIST'})) // dispatches to update parent family task list on parent side
|
||||||
|
|||||||
@@ -8,16 +8,13 @@ import { tableReload } from "../../store/TableReloads";
|
|||||||
import LoadingSpinner from "../Spinners/LoadingSpinner";
|
import LoadingSpinner from "../Spinners/LoadingSpinner";
|
||||||
import HomeModal from "./HomeModal";
|
import HomeModal from "./HomeModal";
|
||||||
|
|
||||||
export default function FamilyDash({ MyActiveJobList=[], serverImg }) {
|
export default function FamilyDash() {
|
||||||
// console.log("PROPS IN FAMILY DASH->", familyOffers?.result_list);
|
|
||||||
|
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
|
|
||||||
const [firstTimeModal, setFirstTimeModal] = useState(true)
|
const [firstTimeModal, setFirstTimeModal] = useState(true)
|
||||||
|
|
||||||
const userApi = new usersService();
|
const userApi = new usersService();
|
||||||
|
|
||||||
// const trending = MyActiveJobList;
|
|
||||||
|
|
||||||
const { familyBannersList } = useSelector((state) => state.familyBannersList);
|
const { familyBannersList } = useSelector((state) => state.familyBannersList);
|
||||||
|
|
||||||
@@ -25,21 +22,21 @@ export default function FamilyDash({ MyActiveJobList=[], serverImg }) {
|
|||||||
|
|
||||||
const { userDetails } = useSelector((state) => state?.userDetails);
|
const { userDetails } = useSelector((state) => state?.userDetails);
|
||||||
|
|
||||||
let [reloadBanner, setReloadBanner] = useState(0)
|
// let [reloadBanner, setReloadBanner] = useState(0)
|
||||||
|
|
||||||
useEffect(()=>{
|
// useEffect(()=>{
|
||||||
if(reloadBanner >= 2){
|
// if(reloadBanner >= 2){
|
||||||
dispatch(tableReload({ type: "FAMILYBANNERSLIST" })); // RELOAD FAMILY BANNERS LIST EVERY 10 MINS
|
// dispatch(tableReload({ type: "FAMILYBANNERSLIST" })); // RELOAD FAMILY BANNERS LIST EVERY 10 MINS
|
||||||
setReloadBanner(0)
|
// setReloadBanner(0)
|
||||||
}
|
// }
|
||||||
const timer = setInterval(()=>{
|
// const timer = setInterval(()=>{
|
||||||
setReloadBanner(prev => prev+1)
|
// setReloadBanner(prev => prev+1)
|
||||||
},300000)
|
// },300000)
|
||||||
|
|
||||||
return ()=>{
|
// return ()=>{
|
||||||
clearInterval(timer)
|
// clearInterval(timer)
|
||||||
}
|
// }
|
||||||
},[reloadBanner])
|
// },[reloadBanner])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|||||||
@@ -2,49 +2,53 @@ import React, { useState, useEffect } from "react";
|
|||||||
import datas from "../../data/product_data.json";
|
import datas from "../../data/product_data.json";
|
||||||
import Layout from "../Partials/Layout";
|
import Layout from "../Partials/Layout";
|
||||||
import usersService from "../../services/UsersService";
|
import usersService from "../../services/UsersService";
|
||||||
import { useSelector } from "react-redux";
|
import { useSelector, useDispatch } 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'
|
import LoadingSpinner from '../../components/Spinners/LoadingSpinner'
|
||||||
|
import { tableReload } from '../../store/TableReloads';
|
||||||
|
|
||||||
export default function Home(props) {
|
export default function Home(props) {
|
||||||
// console.log("PROPS IN HOME->", props);
|
|
||||||
// const userApi = new usersService();
|
const dispatch = useDispatch()
|
||||||
|
|
||||||
const { commonHeadBanner } = useSelector((state) => state.commonHeadBanner);
|
const { commonHeadBanner } = useSelector((state) => state.commonHeadBanner);
|
||||||
const { userDetails } = useSelector((state) => state?.userDetails);
|
const { userDetails } = useSelector((state) => state?.userDetails);
|
||||||
|
|
||||||
|
useEffect(()=>{
|
||||||
|
if(!commonHeadBanner.loading && (!commonHeadBanner?.data || Object.keys(commonHeadBanner?.data).length < 1)){
|
||||||
|
dispatch(tableReload({ type: "HOMEBANNERS" })); // reloads home banner in case it fails to load or encounters error while loading
|
||||||
|
}
|
||||||
|
},[])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Layout>
|
<Layout>
|
||||||
<div className="w-full">
|
<div className="w-full">
|
||||||
{userDetails && userDetails?.account_type == "FAMILY" ? (
|
<>
|
||||||
<FamilyDash
|
{userDetails && userDetails?.account_type == "FAMILY" ? (
|
||||||
account={userDetails}
|
<FamilyDash
|
||||||
commonHeadData={props.bannerList}
|
account={userDetails}
|
||||||
// familyOffers={MyOffersList?.data}
|
/>
|
||||||
serverImg = {userDetails?.session_image_server}
|
) : userDetails && userDetails?.account_type == "FULL" ? (
|
||||||
// MyActiveJobList={MyActiveJobList?.data}
|
<>
|
||||||
/>
|
{commonHeadBanner.loading ?
|
||||||
) : userDetails && userDetails?.account_type == "FULL" ? (
|
<LoadingSpinner height='h-48' size='16' />
|
||||||
<>
|
:
|
||||||
{Object.keys(commonHeadBanner).length < 1 ?
|
<FullAccountDash
|
||||||
<LoadingSpinner height='h-48' size='16' />
|
bannerList={commonHeadBanner?.data?.result_list}
|
||||||
:
|
dashTypes={commonHeadBanner?.data?.home_dash_type}
|
||||||
<FullAccountDash
|
offersList={commonHeadBanner?.data?.offers_list}
|
||||||
bannerList={props.bannerList}
|
imageServer={commonHeadBanner?.data?.session_image_server}
|
||||||
dashTypes={props.dashTypes}
|
/>
|
||||||
// offersList={MyOffersList}
|
|
||||||
// MyActiveJobList={MyActiveJobList}
|
|
||||||
offersList={props.offersList}
|
|
||||||
imageServer={props.imageServer}
|
|
||||||
/>
|
|
||||||
}
|
}
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<div>
|
<div>
|
||||||
You are not logged in or your account type is not supported.
|
You are not logged in or your account type is not supported.
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</>
|
||||||
|
</div>
|
||||||
</Layout>
|
</Layout>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,17 +66,17 @@ export default function LearnMore() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
//FUNCTION TO GET LEARN MORE TOPIC
|
//FUNCTION TO GET LEARN MORE TOPIC
|
||||||
|
|
||||||
useEffect(()=>{
|
useEffect(()=>{
|
||||||
apiCall.getLearnmoreTopics().then((res)=>{
|
apiCall.getLearnmoreTopics().then((res)=>{
|
||||||
if(res.data.internal_return < 0){ // success but no data
|
if(res.data.internal_return < 0){ // success but no data
|
||||||
setTopics(prev => ({...prev, loading: false}))
|
setTopics(prev => ({...prev, loading: false}))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const resData = res?.data?.result_list
|
const resData = res?.data?.result_list || []
|
||||||
|
// console.log('resData', resData)
|
||||||
setTopics(prev => ({...prev, loading: false, data: resData}))
|
setTopics(prev => ({...prev, loading: false, data: resData}))
|
||||||
setTabs(prev => {
|
setTabs(prev => {
|
||||||
return prev.map((item, index) => ({...item, title:resData[index].topic}))
|
return prev?.map((item, index) => ({...item, title:resData[index]?.topic}))
|
||||||
})
|
})
|
||||||
setSelectedTab(resData[0].topic)
|
setSelectedTab(resData[0].topic)
|
||||||
// console.log('RES', resData)
|
// console.log('RES', resData)
|
||||||
@@ -130,7 +130,7 @@ export default function LearnMore() {
|
|||||||
<>
|
<>
|
||||||
{(topics?.data && topics?.data?.length > 0) ?
|
{(topics?.data && topics?.data?.length > 0) ?
|
||||||
<div dangerouslySetInnerHTML={{
|
<div dangerouslySetInnerHTML={{
|
||||||
__html: topics?.data?.filter(item => item.topic == selectedTab)[0]?.contents,
|
__html: topics?.data?.filter(item => item?.topic == selectedTab)[0]?.contents,
|
||||||
}} className='prose dark:text-white dark:bg-dark-white'
|
}} className='prose dark:text-white dark:bg-dark-white'
|
||||||
>
|
>
|
||||||
{/* {topics?.data?.filter(item => item.topic == selectedTab)[0]?.contents} */}
|
{/* {topics?.data?.filter(item => item.topic == selectedTab)[0]?.contents} */}
|
||||||
|
|||||||
@@ -31,7 +31,10 @@ function ReferralTable({ history }) {
|
|||||||
currentReferral.map((item, index) => (
|
currentReferral.map((item, index) => (
|
||||||
<tr key={index} className="text-slate-500">
|
<tr key={index} className="text-slate-500">
|
||||||
<td className="p-3">
|
<td className="p-3">
|
||||||
{item.added_date} / {item.firstname} {item.lastname}
|
<div style={{flexDirection: "column"}} >
|
||||||
|
<div style={{color: "blue"}}>{item.added_date} </div>
|
||||||
|
<div>{item.firstname} {item.lastname}</div>
|
||||||
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td className="p-3">{item.email}</td>
|
<td className="p-3">{item.email}</td>
|
||||||
<td className="p-3">{item.status}</td>
|
<td className="p-3">{item.status}</td>
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ import axios from 'axios'
|
|||||||
function Default({ children }) {
|
function Default({ children }) {
|
||||||
const location = useLocation()
|
const location = useLocation()
|
||||||
|
|
||||||
|
const [nocache, setNoCache] = useState(false) // holds cache/nocache value
|
||||||
|
|
||||||
// dark mode setup
|
// dark mode setup
|
||||||
const [theme, setTheme] = useState(null);
|
const [theme, setTheme] = useState(null);
|
||||||
|
|
||||||
@@ -16,6 +18,10 @@ function Default({ children }) {
|
|||||||
const queryParams = new URLSearchParams(location?.search);
|
const queryParams = new URLSearchParams(location?.search);
|
||||||
const country = queryParams.get("cnt")?.toUpperCase();
|
const country = queryParams.get("cnt")?.toUpperCase();
|
||||||
|
|
||||||
|
const handleThemeSwitch = () => {
|
||||||
|
setTheme(theme === "dark" ? "light" : "dark");
|
||||||
|
};
|
||||||
|
|
||||||
const getLocation = () => {
|
const getLocation = () => {
|
||||||
if (navigator.geolocation) {
|
if (navigator.geolocation) {
|
||||||
navigator.geolocation.getCurrentPosition(
|
navigator.geolocation.getCurrentPosition(
|
||||||
@@ -58,10 +64,6 @@ function Default({ children }) {
|
|||||||
}
|
}
|
||||||
}, [theme]);
|
}, [theme]);
|
||||||
|
|
||||||
const handleThemeSwitch = () => {
|
|
||||||
setTheme(theme === "dark" ? "light" : "dark");
|
|
||||||
};
|
|
||||||
|
|
||||||
useEffect(()=>{
|
useEffect(()=>{
|
||||||
if(country){
|
if(country){
|
||||||
setCountryMode(country)
|
setCountryMode(country)
|
||||||
@@ -75,7 +77,7 @@ function Default({ children }) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<DarkModeContext.Provider value={{ theme, handleThemeSwitch, countryMode }}>
|
<DarkModeContext.Provider value={{ theme, handleThemeSwitch, countryMode, nocache, setNoCache }}>
|
||||||
{children && children}
|
{children && children}
|
||||||
</DarkModeContext.Provider>
|
</DarkModeContext.Provider>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React, { useEffect, useState } from "react";
|
import React, { useEffect, useState } from "react";
|
||||||
import { toast } from "react-toastify";
|
// import { toast } from "react-toastify";
|
||||||
import usersService from "../../services/UsersService";
|
import usersService from "../../services/UsersService";
|
||||||
import InputCom from "../Helpers/Inputs/InputCom";
|
import InputCom from "../Helpers/Inputs/InputCom";
|
||||||
import LoadingSpinner from "../Spinners/LoadingSpinner";
|
import LoadingSpinner from "../Spinners/LoadingSpinner";
|
||||||
@@ -74,7 +74,7 @@ function ReferralDisplay() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
//FUNCTION TO SEND REFERRAL MESSAGE
|
//FUNCTION TO SEND REFERRAL MESSAGE
|
||||||
const sendReferralMsg = (postData) => {
|
const sendReferralMsg = (postData, helpers) => {
|
||||||
apiCall
|
apiCall
|
||||||
.sendReferralMsg(postData)
|
.sendReferralMsg(postData)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
@@ -84,11 +84,17 @@ function ReferralDisplay() {
|
|||||||
loading: false,
|
loading: false,
|
||||||
status: false,
|
status: false,
|
||||||
});
|
});
|
||||||
return;
|
setTimeout(()=>{
|
||||||
|
setError({ message: '', loading: false, status: false });
|
||||||
|
},3000)
|
||||||
} else {
|
} else {
|
||||||
toast.success(res.data.status | "Message Sent!");
|
// toast.success(res.data.status | "Message Sent!");
|
||||||
setError({ message: "", loading: false, status: true });
|
setError({ message: res.data.status, loading: false, status: true });
|
||||||
|
helpers.resetForm() // resets the form data
|
||||||
setRefHistoryReload((prev) => !prev);
|
setRefHistoryReload((prev) => !prev);
|
||||||
|
setTimeout(()=>{
|
||||||
|
setError({ message: '', loading: false, status: true });
|
||||||
|
},3000)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
@@ -97,13 +103,16 @@ function ReferralDisplay() {
|
|||||||
loading: false,
|
loading: false,
|
||||||
status: false,
|
status: false,
|
||||||
});
|
});
|
||||||
|
setTimeout(()=>{
|
||||||
|
setError({ message: '', loading: false, status: false });
|
||||||
|
},3000)
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
//FUNCTION TO HANDLE SUBMIT
|
//FUNCTION TO HANDLE SUBMIT
|
||||||
const handleSubmit = (values, helpers) => {
|
const handleSubmit = (values, helpers) => {
|
||||||
setError({ message: "", loading: true, status: false });
|
setError({ message: "", loading: true, status: false });
|
||||||
sendReferralMsg({...values}); // FUNCTION TO SEND REFERRAL MESSAGE
|
sendReferralMsg({...values}, helpers); // FUNCTION TO SEND REFERRAL MESSAGE
|
||||||
};
|
};
|
||||||
|
|
||||||
const [selectedTab, setSelectedTab] = useState("Send Referral");
|
const [selectedTab, setSelectedTab] = useState("Send Referral");
|
||||||
@@ -228,7 +237,7 @@ function ReferralDisplay() {
|
|||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
{error.message != "" && (
|
{error.message != "" && (
|
||||||
<p className="text-base text-red-500 py-2">{error.message}</p>
|
<p className={`text-base py-2 ${error.status ? 'text-emerald-500' : 'text-red-500'}`}>{error.message}</p>
|
||||||
)}
|
)}
|
||||||
<div className="referral-btn flex justify-end items-center py-4">
|
<div className="referral-btn flex justify-end items-center py-4">
|
||||||
{error.loading ? (
|
{error.loading ? (
|
||||||
@@ -237,6 +246,7 @@ function ReferralDisplay() {
|
|||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
className="px-2 h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white"
|
className="px-2 h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white"
|
||||||
|
disabled={error.loading || error.status}
|
||||||
>
|
>
|
||||||
Send Message
|
Send Message
|
||||||
</button>
|
</button>
|
||||||
@@ -251,9 +261,12 @@ function ReferralDisplay() {
|
|||||||
{selectedTab == 'Referral List' &&
|
{selectedTab == 'Referral List' &&
|
||||||
<>
|
<>
|
||||||
<div className="w-full p-4">
|
<div className="w-full p-4">
|
||||||
<h2 className="mb-2 text-slate-900 dark:text-white text-xl lg:text-2xl font-medium">
|
<div className='mb-2 flex flex-wrap gap-4 items-center'>
|
||||||
Referral List
|
<h2 className="text-slate-900 dark:text-white text-xl lg:text-2xl font-medium">
|
||||||
</h2>
|
Referral List
|
||||||
|
</h2>
|
||||||
|
<p className='text-slate-900 dark:text-white text-sm lg:text-base'>Uncompleted signup will be removed automatically after 7 days</p>
|
||||||
|
</div>
|
||||||
{referralList.loading ? (
|
{referralList.loading ? (
|
||||||
<LoadingSpinner size="22" color="sky-blue" />
|
<LoadingSpinner size="22" color="sky-blue" />
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
@@ -59,6 +59,7 @@ export const apiConst = {
|
|||||||
WRENCHBOARD_RESET_PASSWORD: 11013 ,
|
WRENCHBOARD_RESET_PASSWORD: 11013 ,
|
||||||
WRENCHBOARD_ACCOUNT_JOBLIST:11014 ,
|
WRENCHBOARD_ACCOUNT_JOBLIST:11014 ,
|
||||||
WRENCHBOARD_VERIFY_PENDING_LINK: 11015,
|
WRENCHBOARD_VERIFY_PENDING_LINK: 11015,
|
||||||
|
WRENCHBOARD_LOAD_REFERLINK: 11072,
|
||||||
WRENCHBOARD_ACCOUNT_RESETPASS: 11016,
|
WRENCHBOARD_ACCOUNT_RESETPASS: 11016,
|
||||||
WRENCHBOARD_ACCOUNT_SETPASSWD: 11017,
|
WRENCHBOARD_ACCOUNT_SETPASSWD: 11017,
|
||||||
WRENCHBOARD_DELETE_PENDING_LINK: 11018,
|
WRENCHBOARD_DELETE_PENDING_LINK: 11018,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { useCallback, useEffect, useMemo, useState } from "react";
|
import { useCallback, useEffect, useMemo, useState, useContext } from "react";
|
||||||
import { useDispatch, useSelector } from "react-redux";
|
import { useDispatch, useSelector } from "react-redux";
|
||||||
import { Navigate, Outlet, useNavigate } from "react-router-dom";
|
import { Navigate, Outlet, useNavigate } from "react-router-dom";
|
||||||
import LoadingSpinner from "../components/Spinners/LoadingSpinner";
|
import LoadingSpinner from "../components/Spinners/LoadingSpinner";
|
||||||
@@ -15,16 +15,20 @@ import { familyBannersList } from "../store/FamilyBannerList";
|
|||||||
import { familyResources } from "../store/FamilyResources";
|
import { familyResources } from "../store/FamilyResources";
|
||||||
import {familyWalletRedeemOptList} from '../store/FamilyWalletRedeemOpt'
|
import {familyWalletRedeemOptList} from '../store/FamilyWalletRedeemOpt'
|
||||||
import { SocketValues } from "../components/Contexts/SocketIOContext";
|
import { SocketValues } from "../components/Contexts/SocketIOContext";
|
||||||
|
import DarkModeContext from '../components/Contexts/DarkModeContext'
|
||||||
|
|
||||||
const AuthRoute = ({ redirectPath = "/login", children }) => {
|
const AuthRoute = ({ redirectPath = "/login", children }) => {
|
||||||
|
|
||||||
let {joinRoom} = SocketValues() // destructures 'SEND MESSAGE' and 'JOIN ROOM' FUNCTIONS FROM SOCKET
|
let {joinRoom} = SocketValues() // destructures 'SEND MESSAGE' and 'JOIN ROOM' FUNCTIONS FROM SOCKET
|
||||||
|
|
||||||
|
// const [nocache, setNoCache] = useState(false) // holds cache/nocache value
|
||||||
|
|
||||||
|
const {nocache, setNoCache} = useContext(DarkModeContext); // Destructures nocache and set nocache from context API
|
||||||
|
|
||||||
const apiCall = useMemo(() => new usersService(), []);
|
const apiCall = useMemo(() => new usersService(), []);
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
const [lastActivityTime, setLastActivityTime] = useState(Date.now());
|
const [lastActivityTime, setLastActivityTime] = useState(Date.now());
|
||||||
const [isLogin, setIsLogin] = useState({ loading: true, status: false });
|
const [isLogin, setIsLogin] = useState({ loading: true, status: false });
|
||||||
const [loadProfileDetails, setLoadProfileDetails] = useState([]);
|
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
||||||
const { jobListTable, marketTableList, walletTable, familyBannersListTable, homeBanners } = useSelector(
|
const { jobListTable, marketTableList, walletTable, familyBannersListTable, homeBanners } = useSelector(
|
||||||
@@ -46,19 +50,12 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const checkInactivity = setInterval(() => {
|
const checkInactivity = setInterval(() => {
|
||||||
let { account_type } = loadProfileDetails;
|
|
||||||
if (account_type === "FAMILY") {
|
if (account_type === "FAMILY") {
|
||||||
if (
|
if (Date.now() - Number(lastActivityTime) > Number(process.env.REACT_APP_SESSION_EXPIRE_MINUTES_FAMILY)) {
|
||||||
Date.now() - lastActivityTime >
|
|
||||||
process.env.REACT_APP_SESSION_EXPIRE_MINUTES_FAMILY
|
|
||||||
) {
|
|
||||||
expireSession();
|
expireSession();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (
|
if (Date.now() - Number(lastActivityTime) > Number(process.env.REACT_APP_SESSION_EXPIRE_MINUTES)) {
|
||||||
Date.now() - lastActivityTime >
|
|
||||||
process.env.REACT_APP_SESSION_EXPIRE_MINUTES
|
|
||||||
) {
|
|
||||||
expireSession();
|
expireSession();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -68,7 +65,7 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
|
|||||||
return () => {
|
return () => {
|
||||||
clearInterval(checkInactivity);
|
clearInterval(checkInactivity);
|
||||||
};
|
};
|
||||||
}, [lastActivityTime, navigate]);
|
}, [lastActivityTime, navigate, isLogin.status]);
|
||||||
|
|
||||||
// Reset last activity time on user input
|
// Reset last activity time on user input
|
||||||
const resetTime = useCallback(() => {
|
const resetTime = useCallback(() => {
|
||||||
@@ -97,9 +94,9 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
|
|||||||
setIsLogin({ loading: false, status: false });
|
setIsLogin({ loading: false, status: false });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
setLoadProfileDetails(res.data);
|
|
||||||
dispatch(updateUserDetails({ ...res.data }));
|
dispatch(updateUserDetails({ ...res.data }));
|
||||||
setIsLogin({ loading: false, status: true });
|
setIsLogin({ loading: false, status: true });
|
||||||
|
setNoCache(true) // Sets no cache to true, so as to trigger nocache whenever used in api call
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
setIsLogin({ loading: false, status: false });
|
setIsLogin({ loading: false, status: false });
|
||||||
@@ -108,24 +105,26 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
|
|||||||
loadProfile();
|
loadProfile();
|
||||||
}else{
|
}else{
|
||||||
setIsLogin({ loading: false, status: true });
|
setIsLogin({ loading: false, status: true });
|
||||||
|
setNoCache(true) // Sets no cache to true, so as to trigger nocache whenever used in api call
|
||||||
}
|
}
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
//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) || isLogin.loading || account_type == 'FAMILY'){ // DO NOT CALL THIS, IF USER ACCOUNT TYPE IS FAMILY
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
dispatch(commonHeadBanner({loading:true, data:{}}));
|
||||||
apiCall
|
apiCall
|
||||||
.getHeroJBanners()
|
.getHeroJBanners()
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res?.data?.internal_return < 0) {
|
if (res?.data?.internal_return < 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
dispatch(commonHeadBanner(res.data));
|
dispatch(commonHeadBanner({loading:false, data:res.data}));
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
// console.log("ERROR ", error);
|
dispatch(commonHeadBanner({loading:false, data:{}}));
|
||||||
});
|
});
|
||||||
}, [isLogin.status, homeBanners]);
|
}, [isLogin.status, homeBanners]);
|
||||||
|
|
||||||
@@ -140,8 +139,6 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
|
|||||||
dispatch(updateNotifications({ loading: false, data: null }));
|
dispatch(updateNotifications({ loading: false, data: null }));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
setLoadProfileDetails(res.data);
|
|
||||||
|
|
||||||
const _raw = res.data?.result_list;
|
const _raw = res.data?.result_list;
|
||||||
|
|
||||||
//Sort the notifications in ascending order based on the API time
|
//Sort the notifications in ascending order based on the API time
|
||||||
@@ -192,7 +189,7 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
|
|||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if((!loggedIn && !isLogin.status) || account_type == 'FAMILY'){ // DO NOT CALL THIS, IF USER ACCOUNT TYPE IS FAMILY
|
if((!loggedIn && !isLogin.status) || isLogin.loading || account_type == 'FAMILY'){ // DO NOT CALL THIS, IF USER ACCOUNT TYPE IS FAMILY
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const getMyJobList = async () => {
|
const getMyJobList = async () => {
|
||||||
@@ -213,7 +210,7 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
|
|||||||
|
|
||||||
//FUNCTION TO GET FULL USER WALLETS
|
//FUNCTION TO GET FULL USER WALLETS
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if((!loggedIn && !isLogin.status) || account_type == 'FAMILY'){ // DO NOT CALL THIS, IF USER ACCOUNT TYPE IS FAMILY
|
if((!loggedIn && !isLogin.status) || isLogin.loading || account_type == 'FAMILY'){ // DO NOT CALL THIS, IF USER ACCOUNT TYPE IS FAMILY
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const getMyWalletList = async () => {
|
const getMyWalletList = async () => {
|
||||||
@@ -235,7 +232,7 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
|
|||||||
|
|
||||||
// FUNCTION TO GET MARKET JOB LIST
|
// FUNCTION TO GET MARKET JOB LIST
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if((!loggedIn && !isLogin.status) || account_type == 'FAMILY'){ // DO NOT CALL THIS, IF USER ACCOUNT TYPE IS FAMILY
|
if((!loggedIn && !isLogin.status) || isLogin.loading || account_type == 'FAMILY'){ // DO NOT CALL THIS, IF USER ACCOUNT TYPE IS FAMILY
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// Getting market data
|
// Getting market data
|
||||||
@@ -254,7 +251,7 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
|
|||||||
|
|
||||||
//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) || isLogin.loading || account_type == 'FAMILY'){ // DO NOT CALL THIS, IF USER ACCOUNT TYPE IS FAMILY
|
||||||
// return
|
// return
|
||||||
// }
|
// }
|
||||||
// apiCall
|
// apiCall
|
||||||
@@ -274,13 +271,16 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
|
|||||||
|
|
||||||
//FUNCTION TO GET FAMILY BANNERS
|
//FUNCTION TO GET FAMILY BANNERS
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if((!loggedIn && !isLogin.status) || account_type == 'FULL'){ // DO NOT CALL THIS, IF USER ACCOUNT TYPE IS FULL
|
if((!loggedIn && !isLogin.status) || isLogin.loading || isLogin.loading || account_type == 'FULL'){ // DO NOT CALL THIS, IF USER ACCOUNT TYPE IS FULL
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const getFamilyBanners = async () => { // FUNCTION TO GET FAMILY BANNERS
|
const getFamilyBanners = async () => { // FUNCTION TO GET FAMILY BANNERS
|
||||||
// setFamilyBannersList({loading:true, result:[]});
|
// setFamilyBannersList({loading:true, result:[]});
|
||||||
|
dispatch(familyBannersList({loading:true}))
|
||||||
|
const noCache = (isLogin.status && nocache )? 1 : 0
|
||||||
|
const reqData = {nocache: noCache}
|
||||||
try {
|
try {
|
||||||
const res = await apiCall.getFamilyBannersList();
|
const res = await apiCall.getFamilyBannersList(reqData);
|
||||||
dispatch(familyBannersList({...res?.data, loading:false}))
|
dispatch(familyBannersList({...res?.data, loading:false}))
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
dispatch(familyBannersList({loading:false}))
|
dispatch(familyBannersList({loading:false}))
|
||||||
@@ -292,7 +292,7 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
|
|||||||
|
|
||||||
//FUNCTION TO GET FAMILY RESOURCES
|
//FUNCTION TO GET FAMILY RESOURCES
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if((!loggedIn && !isLogin.status) || account_type == 'FULL'){ // DO NOT CALL THIS, IF USER ACCOUNT TYPE IS FULL
|
if((!loggedIn && !isLogin.status) || isLogin.loading || account_type == 'FULL'){ // DO NOT CALL THIS, IF USER ACCOUNT TYPE IS FULL
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const getFamilyResourcesList = async () => { // FUNCTION TO GET FAMILY BANNERS
|
const getFamilyResourcesList = async () => { // FUNCTION TO GET FAMILY BANNERS
|
||||||
@@ -310,7 +310,7 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
|
|||||||
|
|
||||||
//FUNCTION TO GET FAMILY WALLET REDEEM OPTIONS
|
//FUNCTION TO GET FAMILY WALLET REDEEM OPTIONS
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if((!loggedIn && !isLogin.status) || account_type == 'FULL'){ // DO NOT CALL THIS, IF USER ACCOUNT TYPE IS FULL
|
if((!loggedIn && !isLogin.status) || isLogin.loading || account_type == 'FULL'){ // DO NOT CALL THIS, IF USER ACCOUNT TYPE IS FULL
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const familyWalletRedeemOptions = async () => { // FUNCTION TO GET FAMILY WALLET REDDEM OPTIONS
|
const familyWalletRedeemOptions = async () => { // FUNCTION TO GET FAMILY WALLET REDDEM OPTIONS
|
||||||
|
|||||||
@@ -618,8 +618,8 @@ class usersService {
|
|||||||
uid: localStorage.getItem("uid"),
|
uid: localStorage.getItem("uid"),
|
||||||
member_id: localStorage.getItem("member_id"),
|
member_id: localStorage.getItem("member_id"),
|
||||||
sessionid: localStorage.getItem("session_token"),
|
sessionid: localStorage.getItem("session_token"),
|
||||||
offset: 1,
|
offset: 0,
|
||||||
limit: 100,
|
limit: 140,
|
||||||
action: apiConst.WRENCHBOARD_ACCOUNT_REFFERHX,
|
action: apiConst.WRENCHBOARD_ACCOUNT_REFFERHX,
|
||||||
};
|
};
|
||||||
return this.postAuxEnd("/refferhx", postData);
|
return this.postAuxEnd("/refferhx", postData);
|
||||||
@@ -1032,6 +1032,14 @@ class usersService {
|
|||||||
return this.postAuxEnd("/verifysignuplink", reqData);
|
return this.postAuxEnd("/verifysignuplink", reqData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
loadRefer(reqData) { // GETS THE INFORMATION OF A USER REFERRED VIA PROMO
|
||||||
|
const postData = {
|
||||||
|
action: apiConst.WRENCHBOARD_LOAD_REFERLINK,
|
||||||
|
...reqData
|
||||||
|
};
|
||||||
|
return this.postAuxEnd("/loadrefer", postData);
|
||||||
|
}
|
||||||
|
|
||||||
// END POINT FOR OFFER RESPONSE (i.e TO ACCEPT, REJECT, CANCEL, ETC OFFER)
|
// END POINT FOR OFFER RESPONSE (i.e TO ACCEPT, REJECT, CANCEL, ETC OFFER)
|
||||||
offersResponse(reqData) {
|
offersResponse(reqData) {
|
||||||
var postData = {
|
var postData = {
|
||||||
@@ -1396,7 +1404,7 @@ class usersService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// API FUNCTION TO FAMILY BANNERS
|
// API FUNCTION TO FAMILY BANNERS
|
||||||
getFamilyBannersList() {
|
getFamilyBannersList(reqData) {
|
||||||
var postData = {
|
var postData = {
|
||||||
uid: localStorage.getItem("uid"),
|
uid: localStorage.getItem("uid"),
|
||||||
member_id: localStorage.getItem("member_id"),
|
member_id: localStorage.getItem("member_id"),
|
||||||
@@ -1404,6 +1412,7 @@ class usersService {
|
|||||||
action: apiConst.WRENCHBOARD_ACCOUNT_FAMILY_BANNERS,
|
action: apiConst.WRENCHBOARD_ACCOUNT_FAMILY_BANNERS,
|
||||||
limit: 20,
|
limit: 20,
|
||||||
offset: 1,
|
offset: 1,
|
||||||
|
...reqData
|
||||||
};
|
};
|
||||||
return this.postAuxEnd("/familybanners", postData);
|
return this.postAuxEnd("/familybanners", postData);
|
||||||
}
|
}
|
||||||
@@ -1665,7 +1674,7 @@ class usersService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
postAuxEnd(uri, reqData, uploadPost=false) {
|
postAuxEnd(uri, reqData, uploadPost=false) {
|
||||||
const endPoint = uploadPost ? process.env.REACT_APP_MEDIA_LINK + uri : process.env.REACT_APP_USERS_ENDPOINT + uri;
|
const endPoint = uploadPost ? process.env.REACT_APP_MEDIA_LINK + uri : 'https://apigate.orion.g1.wrenchboard.com/en/wrench/api/v1' + uri;
|
||||||
const session_token = localStorage.getItem("session_token");
|
const session_token = localStorage.getItem("session_token");
|
||||||
// session_token = session_token !=null ?session_token : '';
|
// session_token = session_token !=null ?session_token : '';
|
||||||
// 'Authorization': `Basic ${(session_token !=null) ?session_token : ''}`,
|
// 'Authorization': `Basic ${(session_token !=null) ?session_token : ''}`,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { createSlice } from "@reduxjs/toolkit";
|
import { createSlice } from "@reduxjs/toolkit";
|
||||||
|
|
||||||
const initialState = {
|
const initialState = {
|
||||||
commonHeadBanner: {}
|
commonHeadBanner: {loading:true, data:{}}
|
||||||
};
|
};
|
||||||
|
|
||||||
export const commonHeadBannerSlice = createSlice({
|
export const commonHeadBannerSlice = createSlice({
|
||||||
|
|||||||
+1
-15
@@ -1,24 +1,10 @@
|
|||||||
import {useState, useEffect} from 'react'
|
|
||||||
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 [bannerOptions, setBannerOptions] = useState({})
|
|
||||||
|
|
||||||
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 (
|
||||||
<>
|
<>
|
||||||
<Home {...bannerOptions} />
|
<Home />
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,78 @@
|
|||||||
|
import React, {useState, useEffect} from "react";
|
||||||
|
import { useLocation } from "react-router-dom";
|
||||||
|
import usersService from '../services/UsersService'
|
||||||
|
|
||||||
|
import SignUp from "../components/AuthPages/SignUp/index2";
|
||||||
|
import LoadingSpinner from '../components/Spinners/LoadingSpinner'
|
||||||
|
import AuthLayout from '../components/AuthPages/AuthLayout2'
|
||||||
|
|
||||||
|
function InviteRefer() {
|
||||||
|
const api = new usersService()
|
||||||
|
|
||||||
|
const location = useLocation();
|
||||||
|
|
||||||
|
const queryParams = new URLSearchParams(location?.search);
|
||||||
|
const refer_link = queryParams.get("refer_link")?.toUpperCase();
|
||||||
|
|
||||||
|
const [reload, setReload] = useState(false)
|
||||||
|
|
||||||
|
let [details, setDetails] = useState({loading:true, error:false, data:{}})
|
||||||
|
|
||||||
|
useEffect(()=>{
|
||||||
|
setDetails({loading:true, error:false, data:{}})
|
||||||
|
if(refer_link){
|
||||||
|
const reqData = {
|
||||||
|
refer_link: refer_link,
|
||||||
|
path: ''
|
||||||
|
}
|
||||||
|
api.loadRefer(reqData).then(res => {
|
||||||
|
if(res?.data?.internal_return < 0){
|
||||||
|
return setDetails({loading:false, error:true, data:{}})
|
||||||
|
}
|
||||||
|
setDetails({loading:false, error:false, data:res.data})
|
||||||
|
}).catch(err => {
|
||||||
|
setDetails({loading:false, error:true, data:{}})
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
setDetails({loading:false, error:false, data:{}})
|
||||||
|
}
|
||||||
|
},[reload])
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
{details.loading ?
|
||||||
|
<LoadingSpinner size="32" color="sky-blue" height="h-screen" />
|
||||||
|
: details.error ?
|
||||||
|
<AuthLayout>
|
||||||
|
<ErrorComponent onClick={()=>setReload(prev => !prev)} />
|
||||||
|
</AuthLayout>
|
||||||
|
:
|
||||||
|
<SignUp details={details.data} />
|
||||||
|
}
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default InviteRefer;
|
||||||
|
|
||||||
|
|
||||||
|
const ErrorComponent = ({ onClick }) => (
|
||||||
|
<div className="input-area">
|
||||||
|
<div className="my-5">
|
||||||
|
<p className="text-[14px] leading-[19px] text-center text-[#181c32]">
|
||||||
|
This error occurs because you have already verified this link or the
|
||||||
|
link has expired. Try login or reset password. If none worked, try to
|
||||||
|
create the account from the start.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="signin-area flex justify-center mb-3.5">
|
||||||
|
<button
|
||||||
|
onClick={onClick}
|
||||||
|
type="button"
|
||||||
|
className={`rounded-[0.475rem] mb-6 text-[15px] font-semibold text-[#009ef7] hover:text-white flex justify-center bg-[#f1faff] hover:bg-[#009ef7] transition-all duration-300 items-center py-[0.8875rem] px-[1.81rem]`}
|
||||||
|
>
|
||||||
|
<span>Try Again</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
import React, {useState, useEffect} from "react";
|
||||||
|
import { useParams } from "react-router-dom";
|
||||||
|
|
||||||
|
import SignUp from "../components/AuthPages/SignUp/index2";
|
||||||
|
|
||||||
|
function MyRefer() {
|
||||||
|
|
||||||
|
const {refer_link} = useParams()
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<SignUp refer_link={refer_link ? refer_link : ''} />
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default MyRefer;
|
||||||
@@ -0,0 +1,78 @@
|
|||||||
|
import React, {useState, useEffect} from "react";
|
||||||
|
import { useLocation } from "react-router-dom";
|
||||||
|
import usersService from '../services/UsersService'
|
||||||
|
|
||||||
|
import SignUp from "../components/AuthPages/SignUp/index2";
|
||||||
|
import LoadingSpinner from '../components/Spinners/LoadingSpinner'
|
||||||
|
import AuthLayout from '../components/AuthPages/AuthLayout2'
|
||||||
|
|
||||||
|
function PromoRefer() {
|
||||||
|
const api = new usersService()
|
||||||
|
|
||||||
|
const location = useLocation();
|
||||||
|
|
||||||
|
const queryParams = new URLSearchParams(location?.search);
|
||||||
|
const refer_link = queryParams.get("refer_link")?.toUpperCase();
|
||||||
|
|
||||||
|
const [reload, setReload] = useState(false)
|
||||||
|
|
||||||
|
let [details, setDetails] = useState({loading:true, error:false, data:{}})
|
||||||
|
|
||||||
|
useEffect(()=>{
|
||||||
|
setDetails({loading:true, error:false, data:{}})
|
||||||
|
if(refer_link){
|
||||||
|
const reqData = {
|
||||||
|
refer_link: refer_link,
|
||||||
|
path: 'promoref'
|
||||||
|
}
|
||||||
|
api.loadRefer(reqData).then(res => {
|
||||||
|
if(res?.data?.internal_return < 0){
|
||||||
|
return setDetails({loading:false, error:true, data:{}})
|
||||||
|
}
|
||||||
|
setDetails({loading:false, error:false, data:res.data})
|
||||||
|
}).catch(err => {
|
||||||
|
setDetails({loading:false, error:true, data:{}})
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
setDetails({loading:false, error:false, data:{}})
|
||||||
|
}
|
||||||
|
},[reload])
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
{details.loading ?
|
||||||
|
<LoadingSpinner size="32" color="sky-blue" height="h-screen" />
|
||||||
|
: details.error ?
|
||||||
|
<AuthLayout>
|
||||||
|
<ErrorComponent onClick={()=>setReload(prev => !prev)} />
|
||||||
|
</AuthLayout>
|
||||||
|
:
|
||||||
|
<SignUp details={details.data} />
|
||||||
|
}
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default PromoRefer;
|
||||||
|
|
||||||
|
|
||||||
|
const ErrorComponent = ({ onClick }) => (
|
||||||
|
<div className="input-area">
|
||||||
|
<div className="my-5">
|
||||||
|
<p className="text-[14px] leading-[19px] text-center text-[#181c32]">
|
||||||
|
This error occurs because you have already verified this link or the
|
||||||
|
link has expired. Try login or reset password. If none worked, try to
|
||||||
|
create the account from the start.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="signin-area flex justify-center mb-3.5">
|
||||||
|
<button
|
||||||
|
onClick={onClick}
|
||||||
|
type="button"
|
||||||
|
className={`rounded-[0.475rem] mb-6 text-[15px] font-semibold text-[#009ef7] hover:text-white flex justify-center bg-[#f1faff] hover:bg-[#009ef7] transition-all duration-300 items-center py-[0.8875rem] px-[1.81rem]`}
|
||||||
|
>
|
||||||
|
<span>Try Again</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
import SignUp from "../components/AuthPages/SignUp/index2";
|
import SignUp from "../components/AuthPages/SignUp/index2";
|
||||||
|
|
||||||
function SignupPageTwo() {
|
function SignupPageTwo() {
|
||||||
@@ -9,4 +10,4 @@ function SignupPageTwo() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default SignupPageTwo;
|
export default SignupPageTwo;
|
||||||
Reference in New Issue
Block a user