Compare commits
24 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| df90d1eea5 | |||
| 45d6220054 | |||
| 95a89c1ccc | |||
| c889c0b093 | |||
| 6b95b8d1ce | |||
| c60debfbba | |||
| cee984e574 | |||
| bf28e501a9 | |||
| 441b21ec35 | |||
| 5f8acf0d7d | |||
| aaf98caf19 | |||
| 3326a61a1f | |||
| 5d4033348c | |||
| 9fb7bb3ed9 | |||
| 4e9f95e59e | |||
| a35394c546 | |||
| 5e1c22674a | |||
| 1f58eec668 | |||
| a161453752 | |||
| 823fea91fb | |||
| ff88b5ddb2 | |||
| 55c99f1c33 | |||
| 334357bdc1 | |||
| 4ef031a03f |
@@ -1,4 +1,5 @@
|
|||||||
SKIP_PREFLIGHT_CHECK=true
|
SKIP_PREFLIGHT_CHECK=true
|
||||||
|
REACT_APP_NODE_ENV="development"
|
||||||
|
|
||||||
REACT_APP_FACEBOOK="https://www.facebook.com/profile.php?id=100066498622246"
|
REACT_APP_FACEBOOK="https://www.facebook.com/profile.php?id=100066498622246"
|
||||||
REACT_APP_TWITTER="https://twitter.com/fluxtra"
|
REACT_APP_TWITTER="https://twitter.com/fluxtra"
|
||||||
|
|||||||
+11
-16
@@ -1,4 +1,5 @@
|
|||||||
SKIP_PREFLIGHT_CHECK=true
|
SKIP_PREFLIGHT_CHECK=true
|
||||||
|
REACT_APP_NODE_ENV="development"
|
||||||
|
|
||||||
REACT_APP_FACEBOOK="https://www.facebook.com/profile.php?id=100066498622246"
|
REACT_APP_FACEBOOK="https://www.facebook.com/profile.php?id=100066498622246"
|
||||||
REACT_APP_TWITTER="https://twitter.com/fluxtra"
|
REACT_APP_TWITTER="https://twitter.com/fluxtra"
|
||||||
@@ -9,15 +10,15 @@ REACT_APP_APPSITE="https://myfitapp.mermsemr.com"
|
|||||||
|
|
||||||
# REACT_APP_AUX_ENDPOINT="http://10.20.30.32:9083/svs/user"
|
# REACT_APP_AUX_ENDPOINT="http://10.20.30.32:9083/svs/user"
|
||||||
# REACT_APP_USERS_ENDPOINT="http://10.20.30.32:9083/svs/user"
|
# REACT_APP_USERS_ENDPOINT="http://10.20.30.32:9083/svs/user"
|
||||||
#REACT_APP_AUX_ENDPOINT="https://apigate.orion.g1.wrenchboard.com/svs/user"
|
# REACT_APP_AUX_ENDPOINT="https://apigate.lotus.g1.wrenchboard.com/svs/user"
|
||||||
#REACT_APP_USERS_ENDPOINT="https://apigate.orion.g1.wrenchboard.com/svs/user"
|
# REACT_APP_USERS_ENDPOINT="https://apigate.lotus.g1.wrenchboard.com/svs/user"
|
||||||
|
|
||||||
REACT_APP_AUX_ENDPOINT="https://apigate.orion.g1.wrenchboard.com/en/wrench/api/v1"
|
REACT_APP_AUX_ENDPOINT="https://apigate.lotus.g1.wrenchboard.com/en/wrench/api/v1"
|
||||||
REACT_APP_USERS_ENDPOINT="https://apigate.orion.g1.wrenchboard.com/en/wrench/api/v1"
|
REACT_APP_USERS_ENDPOINT="https://apigate.lotus.g1.wrenchboard.com/en/wrench/api/v1"
|
||||||
REACT_APP_ENDPOINT_KEY="WRENCH-BOARD-2024"
|
REACT_APP_ENDPOINT_KEY="WRENCH-BOARD-2024"
|
||||||
|
|
||||||
#SOCKETS ENDS
|
#SOCKETS ENDS
|
||||||
REACT_APP_PRIMARY_SOCKET="https://socket.wrenchboard.com"
|
REACT_APP_PRIMARY_SOCKET="https://socket-dev.wrenchboard.com"
|
||||||
|
|
||||||
#"https://devapi.mermsemr.com/en/desktop/api/v2/myfituser"
|
#"https://devapi.mermsemr.com/en/desktop/api/v2/myfituser"
|
||||||
|
|
||||||
@@ -35,20 +36,13 @@ REACT_APP_RESET_START_ERROR_TIMEOUT=3000
|
|||||||
#NUMBER OF ITEMS PER PAGE
|
#NUMBER OF ITEMS PER PAGE
|
||||||
REACT_APP_ITEM_PER_PAGE=5
|
REACT_APP_ITEM_PER_PAGE=5
|
||||||
|
|
||||||
#apigate.orion.g1.wrenchboard.com:76.209.103.227
|
#apigate.lotus.g1.wrenchboard.com:76.209.103.227
|
||||||
#apigate.orion.g1.wrenchboard.com:76.209.103.227
|
#apigate.orion.g1.wrenchboard.com:76.209.103.227
|
||||||
|
|
||||||
REACT_APP_GOOGLE_CLIENT_ID=817021856543-ad9nsjgdpsu2s2jrl63j3ihrv7lbf6ma.apps.googleusercontent.com
|
REACT_APP_GOOGLE_CLIENT_ID=817021856543-ad9nsjgdpsu2s2jrl63j3ihrv7lbf6ma.apps.googleusercontent.com
|
||||||
REACT_APP_GOOGLE_CLIENT_SECRET=aozK_2G8UjaCmLgPPkv9abIm
|
REACT_APP_GOOGLE_CLIENT_SECRET=aozK_2G8UjaCmLgPPkv9abIm
|
||||||
REACT_APP_GOOGLE_CLIENT_SCOPE="https://www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile"
|
REACT_APP_GOOGLE_CLIENT_SCOPE="https://www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile"
|
||||||
REACT_APP_GOOGLE_REDIRECT_URL=https://users.wrenchboard.com/login/auth/
|
REACT_APP_GOOGLE_REDIRECT_URL=http://localhost:9082/login/auth/
|
||||||
|
|
||||||
REACT_APP_FACEBOOK_CLIENT_ID2=390204307987009
|
|
||||||
REACT_APP_FACEBOOK_CLIENT_SECRET2=19f778e312f2ab96d147bacb612910c2
|
|
||||||
REACT_APP_FACEBOOK_CLIENT_SCOPE="email,public_profile"
|
|
||||||
REACT_APP_FACEBOOK_REDIRECT_URL="https://users.wrenchboard.com/login/auth/flogin"
|
|
||||||
|
|
||||||
DISABLE_ESLINT_PLUGIN=true
|
|
||||||
|
|
||||||
#File Handling
|
#File Handling
|
||||||
REACT_APP_MAX_FILE_SIZE=1048576
|
REACT_APP_MAX_FILE_SIZE=1048576
|
||||||
@@ -56,6 +50,7 @@ REACT_APP_MAX_VIDEO_FILE_SIZE=31457280
|
|||||||
REACT_APP_TOTAL_NUM_FILE=4
|
REACT_APP_TOTAL_NUM_FILE=4
|
||||||
|
|
||||||
REACT_APP_LOGOUT_TEXT="Sign Out"
|
REACT_APP_LOGOUT_TEXT="Sign Out"
|
||||||
|
|
||||||
REACT_APP_APPLE_SOCIAL_LOGIN=0
|
REACT_APP_APPLE_SOCIAL_LOGIN=0
|
||||||
REACT_APP_LINKEDIN_SOCIAL_LOGIN=0
|
REACT_APP_LINKEDIN_SOCIAL_LOGIN=0
|
||||||
|
|
||||||
@@ -94,7 +89,7 @@ REACT_APP_SHOW_ACCOUNT_DASH=1
|
|||||||
REACT_APP_SHOW_SLIDER_BANNERS=0
|
REACT_APP_SHOW_SLIDER_BANNERS=0
|
||||||
|
|
||||||
# FOR MEDIA LINK
|
# FOR MEDIA LINK
|
||||||
REACT_APP_MEDIA_LINK='https://media.wrenchboard.com'
|
REACT_APP_MEDIA_LINK='https://dev-media.wrenchboard.com'
|
||||||
|
|
||||||
# FOR FAMILY GAME LINK
|
# FOR FAMILY GAME LINK
|
||||||
REACT_APP_FAM_GAME_LINK='https://games.wrenchboard.com'
|
REACT_APP_FAM_GAME_LINK='https://games.wrenchboard.com'
|
||||||
@@ -103,4 +98,4 @@ 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=1
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
SKIP_PREFLIGHT_CHECK=true
|
SKIP_PREFLIGHT_CHECK=true
|
||||||
|
REACT_APP_NODE_ENV="production"
|
||||||
|
|
||||||
REACT_APP_FACEBOOK="https://www.facebook.com/profile.php?id=100066498622246"
|
REACT_APP_FACEBOOK="https://www.facebook.com/profile.php?id=100066498622246"
|
||||||
REACT_APP_TWITTER="https://twitter.com/fluxtra"
|
REACT_APP_TWITTER="https://twitter.com/fluxtra"
|
||||||
|
|||||||
+5
-2
@@ -1,5 +1,8 @@
|
|||||||
# pull the base image
|
# pull the base image
|
||||||
FROM node:alpine
|
#FROM node:alpine
|
||||||
|
FROM node:20.11.0-alpine
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Build args
|
# Build args
|
||||||
ARG NODE_ENV
|
ARG NODE_ENV
|
||||||
@@ -26,7 +29,7 @@ COPY nginx.conf ./
|
|||||||
|
|
||||||
COPY run.sh ./
|
COPY run.sh ./
|
||||||
|
|
||||||
RUN npm install --legacy-peer-deps
|
# RUN npm install --legacy-peer-deps
|
||||||
|
|
||||||
# add app
|
# add app
|
||||||
COPY . ./
|
COPY . ./
|
||||||
|
|||||||
+3
-2
@@ -3,6 +3,7 @@
|
|||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"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,8 +37,8 @@
|
|||||||
"yup": "^1.1.1"
|
"yup": "^1.1.1"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "react-scripts start -e .env.production",
|
"start": "react-scripts start -e .env.development",
|
||||||
"build": "react-scripts build -e .env.production",
|
"build": "GENERATE_SOURCEMAP=false react-scripts build -e .env.production",
|
||||||
"test": "react-scripts test",
|
"test": "react-scripts test",
|
||||||
"eject": "react-scripts eject"
|
"eject": "react-scripts eject"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"short_name": "React App",
|
"short_name": "WrenchBoard App",
|
||||||
"name": "Create React App Sample",
|
"name": "WrenchBoard User Web",
|
||||||
"icons": [],
|
"icons": [],
|
||||||
"start_url": ".",
|
"start_url": ".",
|
||||||
"display": "standalone",
|
"display": "standalone",
|
||||||
|
|||||||
@@ -13,8 +13,9 @@ else
|
|||||||
# build the app and serve it via nginx
|
# build the app and serve it via nginx
|
||||||
echo "Production build"
|
echo "Production build"
|
||||||
npm install --legacy-peer-deps
|
npm install --legacy-peer-deps
|
||||||
#npm run build
|
npm run build
|
||||||
npm start
|
# Testing sometimes
|
||||||
|
# npm run start
|
||||||
nginx -g 'daemon off;' -c /usr/src/app/nginx.conf
|
nginx -g 'daemon off;' -c /usr/src/app/nginx.conf
|
||||||
nginx -c /usr/src/app/nginx.conf
|
nginx -c /usr/src/app/nginx.conf
|
||||||
fi
|
fi
|
||||||
|
|||||||
+15
-5
@@ -1,23 +1,33 @@
|
|||||||
|
import {Suspense, lazy} from 'react'
|
||||||
import { Navigate, useLocation } from "react-router-dom";
|
import { Navigate, useLocation } from "react-router-dom";
|
||||||
import Routers from "./Routers";
|
// import Routers from "./Routers";
|
||||||
|
// import SocketIOContextProvider from "./components/Contexts/SocketIOContext";
|
||||||
import Toaster from "./components/Helpers/Toaster";
|
import Toaster from "./components/Helpers/Toaster";
|
||||||
import Default from "./components/Partials/Default";
|
import Default from "./components/Partials/Default";
|
||||||
import SocketIOContextProvider from "./components/Contexts/SocketIOContext";
|
|
||||||
|
|
||||||
|
import { disableReactDevTools } from '@fvilers/disable-react-devtools';
|
||||||
|
import LoadingSpinner from './components/Spinners/LoadingSpinner';
|
||||||
|
|
||||||
|
if (process.env.REACT_APP_NODE_ENV === 'production') {
|
||||||
|
disableReactDevTools();
|
||||||
|
}
|
||||||
|
const Routers = lazy(()=>import('./Routers'))
|
||||||
function App() {
|
function App() {
|
||||||
const { pathname } = useLocation();
|
const { pathname } = useLocation();
|
||||||
return (
|
return (
|
||||||
<Default>
|
<Default>
|
||||||
<SocketIOContextProvider>
|
{/* <SocketIOContextProvider> */}
|
||||||
<>
|
<>
|
||||||
{pathname.startsWith("/@") ? (
|
{pathname.startsWith("/@") ? (
|
||||||
<Navigate to="/app" replace={true} />
|
<Navigate to="/app" replace={true} />
|
||||||
) : (
|
) : (
|
||||||
<Routers />
|
<Suspense fallback={<LoadingSpinner size="32" color="sky-blue" height="h-screen" />}>
|
||||||
|
<Routers />
|
||||||
|
</Suspense>
|
||||||
)}
|
)}
|
||||||
<Toaster />
|
<Toaster />
|
||||||
</>
|
</>
|
||||||
</SocketIOContextProvider>
|
{/* </SocketIOContextProvider> */}
|
||||||
</Default>
|
</Default>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
+160
-155
@@ -1,76 +1,79 @@
|
|||||||
import { Route, Routes } from "react-router-dom";
|
import { Route, Routes } from "react-router-dom";
|
||||||
import FourZeroFour from "./components/FourZeroFour";
|
import { lazy } from "react";
|
||||||
import ScrollToTop from "./components/Helpers/ScrollToTop";
|
|
||||||
import StartJob from "./components/MyJobs/StartJob";
|
|
||||||
import Notification from "./components/Notification";
|
|
||||||
import AuthRoute from "./middleware/AuthRoute";
|
|
||||||
import AppDownloadPage from "./views/AppDownloadPage";
|
|
||||||
import AppleRedirectPage from "./views/AppleRedirectPage";
|
|
||||||
import AuthProfilePage from "./views/AuthProfilePage";
|
|
||||||
import AuthRedirect from "./views/AuthRedirect";
|
|
||||||
import BlogPage from "./views/BlogPage";
|
|
||||||
import CalendarPage from "./views/CalendarPage";
|
|
||||||
import CollectionItemPage from "./views/CollectionItemPage";
|
|
||||||
import FacebookRedirect from "./views/FacebookRedirect";
|
|
||||||
import FamilyAccPage from "./views/FamilyAccPage";
|
|
||||||
import FamilyManagePage from "./views/FamilyManagePage";
|
|
||||||
import FamilyMarketPage from "./views/FamilyMarketPage";
|
|
||||||
import FamilySettingsPage from "./views/FamilySettingsPage";
|
|
||||||
import ForgotPasswordPages from "./views/ForgotPasswordPages";
|
|
||||||
import ForgotPasswordPagesTwo from "./views/ForgotPasswordPagesTwo";
|
|
||||||
import HistoryPage from "./views/HistoryPage";
|
|
||||||
import HomePages from "./views/HomePages";
|
|
||||||
import JobGroupsPage from "./views/JobGroupsPage";
|
|
||||||
import LndPage from "./views/LndPage";
|
|
||||||
import LoginPage from "./views/LoginPage";
|
|
||||||
import LoginPageTwo from "./views/LoginPageTwo";
|
|
||||||
import LoginLandingPage from './views/LoginLandingPage'
|
import LoginLandingPage from './views/LoginLandingPage'
|
||||||
import ManageActiveJobs from "./views/ManageActiveJobs";
|
import LoginPage from "./views/LoginPage";
|
||||||
import ManageInterestOfferPage from "./views/ManageInterestOfferPage";
|
import HomePages from "./views/HomePages";
|
||||||
import MarketPlacePage from "./views/MarketPlacePage";
|
import SocketConnection from "./middleware/SocketConnection";
|
||||||
import MyActiveJobsPage from "./views/MyActiveJobsPage";
|
|
||||||
import MyCouponPage from "./views/MyCouponPage";
|
|
||||||
import MyJobsPage from "./views/MyJobsPage";
|
const FourZeroFour = lazy(() => import("./components/FourZeroFour"));
|
||||||
import MyOffersPage from "./views/MyOffersPage";
|
const ScrollToTop = lazy(() => import("./components/Helpers/ScrollToTop"));
|
||||||
import MyPastDueJobsPage from "./views/MyPastDueJobsPage";
|
const StartJob = lazy(() => import("./components/MyJobs/StartJob"));
|
||||||
import MyReviewDueJobsPage from "./views/MyReviewDueJobsPage";
|
const Notification = lazy(() => import("./components/Notification"));
|
||||||
import MyTaskPage from "./views/MyTaskPage";
|
const AuthRoute = lazy(() => import("./middleware/AuthRoute"));
|
||||||
import MyWaitingJobsPage from "./views/MyWaitingJobsPage";
|
const AppDownloadPage = lazy(() => import("./views/AppDownloadPage"));
|
||||||
import MyWalletPage from "./views/MyWalletPage";
|
const AppleRedirectPage = lazy(() => import("./views/AppleRedirectPage"));
|
||||||
import OffersInterestPage from "./views/OffersInterestPage";
|
const AuthProfilePage = lazy(() => import("./views/AuthProfilePage"));
|
||||||
import ReferralPage from "./views/ReferralPage";
|
const AuthRedirect = lazy(() => import("./views/AuthRedirect"));
|
||||||
import RemindersPage from "./views/RemindersPage";
|
const BlogPage = lazy(() => import("./views/BlogPage"));
|
||||||
import ResourcePage from "./views/ResourcePage";
|
const CalendarPage = lazy(() => import("./views/CalendarPage"));
|
||||||
import SavedPage from "./views/SavedPage";
|
const CollectionItemPage = lazy(() => import("./views/CollectionItemPage"));
|
||||||
import SellPage from "./views/SellPage";
|
const FacebookRedirect = lazy(() => import("./views/FacebookRedirect"));
|
||||||
import SettingsPage from "./views/SettingsPage";
|
const FamilyManagePage = lazy(() => import("./views/FamilyManagePage"));
|
||||||
import SignupPage from "./views/SignupPage";
|
const FamilyMarketPage = lazy(() => import("./views/FamilyMarketPage"));
|
||||||
import SignupPageTwo from "./views/SignupPageTwo";
|
|
||||||
import TrackingPage from "./views/TrackingPage";
|
const ForgotPasswordPages = lazy(()=> import("./views/ForgotPasswordPages"));
|
||||||
import UpdatePasswordPages from "./views/UpdatePasswordPages";
|
const ForgotPasswordPagesTwo = lazy(()=> import("./views/ForgotPasswordPagesTwo"));
|
||||||
import UpdatePasswordPagesTwo from "./views/UpdatePasswordPagesTwo";
|
const HistoryPage = lazy(()=> import("./views/HistoryPage"));
|
||||||
import UploadProductPage from "./views/UploadProductPage";
|
const JobGroupsPage = lazy(()=> import("./views/JobGroupsPage"));
|
||||||
import UserProfilePage from "./views/UserProfilePage";
|
const LndPage = lazy(()=> import("./views/LndPage"));
|
||||||
import VerifyLinkPages from "./views/VerifyLinkPages";
|
const LoginPageTwo = lazy(()=> import("./views/LoginPageTwo"));
|
||||||
import VerifyLinkPagesTwo from "./views/VerifyLinkPagesTwo";
|
const ManageActiveJobs = lazy(()=> import("./views/ManageActiveJobs"));
|
||||||
import VerifyPasswordPages from "./views/VerifyPasswordPages";
|
const ManageInterestOfferPage = lazy(()=> import("./views/ManageInterestOfferPage"));
|
||||||
import VerifyPasswordPagesTwo from "./views/VerifyPasswordPagesTwo";
|
const MarketPlacePage = lazy(()=> import("./views/MarketPlacePage"));
|
||||||
import VerifyYouPages from "./views/VerifyYouPages";
|
const MyActiveJobsPage = lazy(()=> import("./views/MyActiveJobsPage"));
|
||||||
import VerifyYouPagesTwo from "./views/VerifyYouPagesTwo";
|
const MyCouponPage = lazy(()=> import("./views/MyCouponPage"));
|
||||||
import YourPages from "./views/YourPage_";
|
const MyJobsPage = lazy(()=> import("./views/MyJobsPage"));
|
||||||
import ParentWaitingPage from "./views/ParentWaitingPage";
|
const MyOffersPage = lazy(()=> import("./views/MyOffersPage"));
|
||||||
import FamilyPendingOfferPage from "./views/FamilyPendingOfferPage";
|
const MyPastDueJobsPage = lazy(()=> import("./views/MyPastDueJobsPage"));
|
||||||
import FamBlogPage from "./views/FamBlogPage"
|
const MyReviewDueJobsPage = lazy(()=> import("./views/MyReviewDueJobsPage"));
|
||||||
import FamAIQuestionPage from "./views/FamAIQuestionPage"
|
const MyTaskPage = lazy(()=> import("./views/MyTaskPage"));
|
||||||
import FamMyFilesPage from "./views/FamMyFilesPage"
|
const MyWaitingJobsPage = lazy(()=> import("./views/MyWaitingJobsPage"));
|
||||||
import FamWorkInProgressPage from "./views/FamWorkInProgressPage";
|
const MyWalletPage = lazy(()=> import("./views/MyWalletPage"));
|
||||||
import MyPastDueTasksPage from "./views/MyPastDueTasksPage";
|
const OffersInterestPage = lazy(()=> import("./views/OffersInterestPage"));
|
||||||
import FamilyWalletPage from "./views/FamilyWalletPage";
|
const ReferralPage = lazy(()=> import("./views/ReferralPage"));
|
||||||
import FamilyActivitiesPage from "./views/FamilyActivitiesPage";
|
const RemindersPage = lazy(()=> import("./views/RemindersPage"));
|
||||||
import FamGamesPage from "./views/FamGamesPage";
|
const ResourcePage = lazy(()=> import("./views/ResourcePage"));
|
||||||
import FamilyRoutesPage from "./views/FamilyRoutesPage";
|
const SavedPage = lazy(()=> import("./views/SavedPage"));
|
||||||
import PromoPage from "./views/PromoPage";
|
const SellPage = lazy(()=> import("./views/SellPage"));
|
||||||
import LearnMorePage from "./views/LearnMorePage";
|
const SettingsPage = lazy(()=> import("./views/SettingsPage"));
|
||||||
|
const SignupPage = lazy(()=> import("./views/SignupPage"));
|
||||||
|
const SignupPageTwo = lazy(()=> import("./views/SignupPageTwo"));
|
||||||
|
const TrackingPage = lazy(()=> import("./views/TrackingPage"));
|
||||||
|
const UpdatePasswordPages = lazy(()=> import("./views/UpdatePasswordPages"));
|
||||||
|
const UpdatePasswordPagesTwo = lazy(()=> import("./views/UpdatePasswordPagesTwo"));
|
||||||
|
const UploadProductPage = lazy(()=> import("./views/UploadProductPage"));
|
||||||
|
const UserProfilePage = lazy(()=> import("./views/UserProfilePage"));
|
||||||
|
const VerifyLinkPages = lazy(()=> import("./views/VerifyLinkPages"));
|
||||||
|
const VerifyLinkPagesTwo = lazy(()=> import("./views/VerifyLinkPagesTwo"));
|
||||||
|
const VerifyPasswordPages = lazy(()=> import("./views/VerifyPasswordPages"));
|
||||||
|
const VerifyPasswordPagesTwo = lazy(()=> import("./views/VerifyPasswordPagesTwo"));
|
||||||
|
const VerifyYouPages = lazy(()=> import("./views/VerifyYouPages"));
|
||||||
|
const VerifyYouPagesTwo = lazy(()=> import("./views/VerifyYouPagesTwo"));
|
||||||
|
const YourPages = lazy(()=> import("./views/YourPage_"));
|
||||||
|
const ParentWaitingPage = lazy(()=> import("./views/ParentWaitingPage"));
|
||||||
|
const FamilyPendingOfferPage = lazy(()=> import("./views/FamilyPendingOfferPage"));
|
||||||
|
const FamBlogPage = lazy(()=> import("./views/FamBlogPage"));
|
||||||
|
const FamAIQuestionPage = lazy(()=> import("./views/FamAIQuestionPage"));
|
||||||
|
const FamMyFilesPage = lazy(()=> import("./views/FamMyFilesPage"));
|
||||||
|
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 (
|
||||||
@@ -127,94 +130,96 @@ export default function Routers() {
|
|||||||
<Route exact path="/app" element={<AppDownloadPage />} />
|
<Route exact path="/app" element={<AppDownloadPage />} />
|
||||||
|
|
||||||
{/* private route */}
|
{/* private route */}
|
||||||
<Route element={<AuthRoute />}>
|
<Route element={<SocketConnection />}>
|
||||||
<Route exact path="/" element={<HomePages />} />
|
<Route element={<AuthRoute />}>
|
||||||
{/* <Route exact path="/active-bids" element={<AcitveBidsPage />} />
|
<Route exact path="/" element={<HomePages />} />
|
||||||
<Route exact path="/notification" element={<Notification />} />
|
{/* <Route exact path="/active-bids" element={<AcitveBidsPage />} />
|
||||||
<Route exact path="/market-place" element={<MarketPlacePage />} />
|
<Route exact path="/notification" element={<Notification />} />
|
||||||
<Route exact path="/shop-details" element={<ShopDetailsPage />} />
|
<Route exact path="/market-place" element={<MarketPlacePage />} />
|
||||||
<Route exact path="/my-collection" element={<MyCollection />} />*/}
|
<Route exact path="/shop-details" element={<ShopDetailsPage />} />
|
||||||
<Route exact path="/reminders" element={<RemindersPage />} />
|
<Route exact path="/my-collection" element={<MyCollection />} />*/}
|
||||||
<Route exact path="/tracking" element={<TrackingPage />} />
|
<Route exact path="/reminders" element={<RemindersPage />} />
|
||||||
<Route exact path="/calendar" element={<CalendarPage />} />
|
<Route exact path="/tracking" element={<TrackingPage />} />
|
||||||
<Route exact path="/resources" element={<ResourcePage />} />
|
<Route exact path="/calendar" element={<CalendarPage />} />
|
||||||
<Route exact path="/my-wallet/*" element={<MyWalletPage />} />
|
<Route exact path="/resources" element={<ResourcePage />} />
|
||||||
<Route exact path="/family-wallet" element={<FamilyWalletPage />} />
|
<Route exact path="/my-wallet/*" element={<MyWalletPage />} />
|
||||||
<Route exact path="/my-coupon" element={<MyCouponPage />} />
|
<Route exact path="/family-wallet" element={<FamilyWalletPage />} />
|
||||||
<Route exact path="/notification" element={<Notification />} />
|
<Route exact path="/my-coupon" element={<MyCouponPage />} />
|
||||||
<Route exact path="/market-place" element={<MarketPlacePage />} />
|
<Route exact path="/notification" element={<Notification />} />
|
||||||
<Route exact path="/market" element={<MarketPlacePage />} />
|
<Route exact path="/market-place" element={<MarketPlacePage />} />
|
||||||
<Route exact path="/familymarket" element={<FamilyMarketPage />} />
|
<Route exact path="/market" element={<MarketPlacePage />} />
|
||||||
<Route exact path="/suggested" element={<ParentWaitingPage />} />
|
<Route exact path="/familymarket" element={<FamilyMarketPage />} />
|
||||||
<Route exact path="/parentwaiting" element={<ParentWaitingPage />} />
|
<Route exact path="/suggested" element={<ParentWaitingPage />} />
|
||||||
<Route exact path="/pending" element={<FamilyPendingOfferPage />} />
|
<Route exact path="/parentwaiting" element={<ParentWaitingPage />} />
|
||||||
<Route exact path="/fam-blog" element={<FamBlogPage />} />
|
<Route exact path="/pending" element={<FamilyPendingOfferPage />} />
|
||||||
<Route exact path="/ai-question" element={<FamAIQuestionPage />} />
|
<Route exact path="/fam-blog" element={<FamBlogPage />} />
|
||||||
<Route exact path="/myfiles" element={<FamMyFilesPage />} />
|
<Route exact path="/ai-question" element={<FamAIQuestionPage />} />
|
||||||
<Route exact path="/ai-lab" element={<FamAIQuestionPage />} />
|
<Route exact path="/myfiles" element={<FamMyFilesPage />} />
|
||||||
<Route exact path="/fam-games" element={<FamGamesPage />} />
|
<Route exact path="/ai-lab" element={<FamAIQuestionPage />} />
|
||||||
<Route exact path="/work-in-progress" element={<FamWorkInProgressPage />} />
|
<Route exact path="/fam-games" element={<FamGamesPage />} />
|
||||||
|
<Route exact path="/work-in-progress" element={<FamWorkInProgressPage />} />
|
||||||
|
|
||||||
<Route exact path="/pastdue" element={<MyPastDueTasksPage />} />
|
<Route exact path="/pastdue" element={<MyPastDueTasksPage />} />
|
||||||
<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="/add-job" element={<AddJobPage />} /> */}
|
||||||
<Route exact path="/my-active-jobs" element={<MyActiveJobsPage />} />
|
<Route exact path="/my-active-jobs" element={<MyActiveJobsPage />} />
|
||||||
<Route
|
<Route
|
||||||
exact
|
exact
|
||||||
path="/my-pastdue-jobs"
|
path="/my-pastdue-jobs"
|
||||||
element={<MyPastDueJobsPage />}
|
element={<MyPastDueJobsPage />}
|
||||||
/>
|
/>
|
||||||
<Route exact path="/my-offers" element={<MyOffersPage />} />
|
<Route exact path="/my-offers" element={<MyOffersPage />} />
|
||||||
<Route exact path="/pend-interest" element={<MyWaitingJobsPage />} />
|
<Route exact path="/pend-interest" element={<MyWaitingJobsPage />} />
|
||||||
<Route
|
<Route
|
||||||
exact
|
exact
|
||||||
path="/my-review-jobs"
|
path="/my-review-jobs"
|
||||||
element={<MyReviewDueJobsPage />}
|
element={<MyReviewDueJobsPage />}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{/* <Route exact path='/acc-family' element={<FamilyAccPage />} />
|
{/* <Route exact path='/acc-family' element={<FamilyAccPage />} />
|
||||||
<Route exact path="/acc-family/activities" element={<FamilyActivitiesPage />} />
|
<Route exact path="/acc-family/activities" element={<FamilyActivitiesPage />} />
|
||||||
<Route exact path="/acc-family/familysettings" element={<FamilySettingsPage />} /> */}
|
<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 />} />
|
||||||
<Route exact path="/start-job" element={<StartJob />} />
|
<Route exact path="/start-job" element={<StartJob />} />
|
||||||
<Route exact path="/yourpage" element={<YourPages />} />
|
<Route exact path="/yourpage" element={<YourPages />} />
|
||||||
<Route
|
<Route
|
||||||
exact
|
exact
|
||||||
path="/manage-active-job"
|
path="/manage-active-job"
|
||||||
element={<ManageActiveJobs />}
|
element={<ManageActiveJobs />}
|
||||||
/>
|
/>
|
||||||
<Route exact path="/blog-page" element={<BlogPage />} />
|
<Route exact path="/blog-page" element={<BlogPage />} />
|
||||||
<Route
|
<Route
|
||||||
exact
|
exact
|
||||||
path="/offer-interest"
|
path="/offer-interest"
|
||||||
element={<OffersInterestPage />}
|
element={<OffersInterestPage />}
|
||||||
/>
|
/>
|
||||||
<Route
|
<Route
|
||||||
exact
|
exact
|
||||||
path="/manage-offer"
|
path="/manage-offer"
|
||||||
element={<ManageInterestOfferPage />}
|
element={<ManageInterestOfferPage />}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Route
|
<Route
|
||||||
exact
|
exact
|
||||||
path="/my-collection/collection-item"
|
path="/my-collection/collection-item"
|
||||||
element={<CollectionItemPage />}
|
element={<CollectionItemPage />}
|
||||||
/>
|
/>
|
||||||
<Route exact path="/sell" element={<SellPage />} />
|
<Route exact path="/sell" element={<SellPage />} />
|
||||||
<Route exact path="/saved" element={<SavedPage />} />
|
<Route exact path="/saved" element={<SavedPage />} />
|
||||||
<Route exact path="/history" element={<HistoryPage />} />
|
<Route exact path="/history" element={<HistoryPage />} />
|
||||||
<Route exact path="/learnmore" element={<LearnMorePage />} />
|
<Route exact path="/learnmore" element={<LearnMorePage />} />
|
||||||
{/*<Route exact path="/upload-product" element={<UploadProductPage />} />*/}
|
{/*<Route exact path="/upload-product" element={<UploadProductPage />} />*/}
|
||||||
<Route exact path="/my-uploads" element={<UploadProductPage />} />
|
<Route exact path="/my-uploads" element={<UploadProductPage />} />
|
||||||
<Route exact path="/profile" element={<AuthProfilePage />} />
|
<Route exact path="/profile" element={<AuthProfilePage />} />
|
||||||
<Route exact path="/user-profile" element={<UserProfilePage />} />
|
<Route exact path="/user-profile" element={<UserProfilePage />} />
|
||||||
<Route exact path="/settings" element={<SettingsPage />} />
|
<Route exact path="/settings" element={<SettingsPage />} />
|
||||||
<Route exact path="/referral" element={<ReferralPage />} />
|
<Route exact path="/referral" element={<ReferralPage />} />
|
||||||
<Route exact path="/job-groups" element={<JobGroupsPage />} />
|
<Route exact path="/job-groups" element={<JobGroupsPage />} />
|
||||||
|
</Route>
|
||||||
</Route>
|
</Route>
|
||||||
<Route path="*" element={<FourZeroFour />} />
|
<Route path="*" element={<FourZeroFour />} />
|
||||||
</Routes>
|
</Routes>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import {
|
|||||||
useDispatch,
|
useDispatch,
|
||||||
useSelector,
|
useSelector,
|
||||||
usersService,
|
usersService,
|
||||||
initialValues as IV,
|
// initialValues as IV,
|
||||||
initialReqState,
|
initialReqState,
|
||||||
useState,
|
useState,
|
||||||
tableReload,
|
tableReload,
|
||||||
@@ -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,7 +117,7 @@ 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="">
|
||||||
@@ -138,7 +138,7 @@ 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
|
||||||
@@ -367,7 +367,7 @@ function AddJob({ popUpHandler, categories }) {
|
|||||||
{/* ERROR DISPLAY AND SUBMIT BUTTON */}
|
{/* ERROR DISPLAY AND SUBMIT BUTTON */}
|
||||||
<div className="content-footer w-full">
|
<div className="content-footer w-full">
|
||||||
{/* error or success display */}
|
{/* error or success display */}
|
||||||
{requestStatus.message != "" &&
|
{requestStatus.message !== "" &&
|
||||||
(!requestStatus.status ? (
|
(!requestStatus.status ? (
|
||||||
<div
|
<div
|
||||||
className={`relative p-4 my-4 text-[#912741] bg-[#fcd9e2] border-[#fbc6d3] mb-4 rounded-[0.475rem] text-md font-light leading-[19.5px] text-[13px]`}
|
className={`relative p-4 my-4 text-[#912741] bg-[#fcd9e2] border-[#fbc6d3] mb-4 rounded-[0.475rem] text-md font-light leading-[19.5px] text-[13px]`}
|
||||||
|
|||||||
@@ -6,7 +6,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 LoginLayout({ 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");
|
||||||
|
|
||||||
@@ -16,7 +16,7 @@ export default function LoginLayout({ slogan, children }) {
|
|||||||
<div
|
<div
|
||||||
className={`relative min-h-screen overflow-y-auto bg-cover bg-center flex flex-col items-center`}
|
className={`relative min-h-screen overflow-y-auto bg-cover bg-center flex flex-col items-center`}
|
||||||
style={{
|
style={{
|
||||||
backgroundImage: `url(${countryMode == "NG" ? bgImgNig : bgImgCom})`,
|
backgroundImage: `url(${countryMode === "NG" ? bgImgNig : bgImgCom})`,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div className="my-5">
|
<div className="my-5">
|
||||||
|
|||||||
@@ -1,63 +1,63 @@
|
|||||||
import React, { useState } from "react";
|
import React from "react";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
import authProfilePic from "../../../assets/images/auth-profile-picture.png";
|
import authProfilePic from "../../../assets/images/auth-profile-picture.png";
|
||||||
import profileBanner from "../../../assets/images/profile-cover.png";
|
import profileBanner from "../../../assets/images/profile-cover.png";
|
||||||
import collections from "../../../data/collectionplan_data.json";
|
|
||||||
import marketPlace from "../../../data/marketplace_data.json";
|
|
||||||
import products from "../../../data/product_data.json";
|
|
||||||
import Layout from "../../Partials/Layout";
|
import Layout from "../../Partials/Layout";
|
||||||
import ActivitiesTab from "./ActivitiesTab";
|
import ActivitiesTab from "./ActivitiesTab";
|
||||||
import CollectionTab from "./CollectionTab";
|
// import collections from "../../../data/collectionplan_data.json";
|
||||||
import CreatedTab from "./CreatedTab";
|
// import marketPlace from "../../../data/marketplace_data.json";
|
||||||
import HiddenProductsTab from "./HiddenProductsTab";
|
// import products from "../../../data/product_data.json";
|
||||||
import OnSaleTab from "./OnSaleTab";
|
// import CollectionTab from "./CollectionTab";
|
||||||
import OwnTab from "./OwnTab";
|
// import CreatedTab from "./CreatedTab";
|
||||||
|
// import HiddenProductsTab from "./HiddenProductsTab";
|
||||||
|
// import OnSaleTab from "./OnSaleTab";
|
||||||
|
// import OwnTab from "./OwnTab";
|
||||||
|
|
||||||
export default function AuthProfile() {
|
export default function AuthProfile() {
|
||||||
const onSaleProducts = marketPlace.data;
|
// const onSaleProducts = marketPlace.data;
|
||||||
const CreatedSell = marketPlace.data;
|
// const CreatedSell = marketPlace.data;
|
||||||
const CreatedBits = products.datas;
|
// const CreatedBits = products.datas;
|
||||||
// const mainProducts = products.datas;
|
// const mainProducts = products.datas;
|
||||||
const ownProducts = products.datas;
|
// const ownProducts = products.datas;
|
||||||
const collectionProducts = collections.data;
|
// const collectionProducts = collections.data;
|
||||||
|
|
||||||
const tabs = [
|
// const tabs = [
|
||||||
{
|
// {
|
||||||
id: 1,
|
// id: 1,
|
||||||
name: "onsale",
|
// name: "onsale",
|
||||||
content: "On Sale",
|
// content: "On Sale",
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
id: 2,
|
// id: 2,
|
||||||
name: "owned",
|
// name: "owned",
|
||||||
content: "Owned",
|
// content: "Owned",
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
id: 3,
|
// id: 3,
|
||||||
name: "created",
|
// name: "created",
|
||||||
content: "Created",
|
// content: "Created",
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
id: 4,
|
// id: 4,
|
||||||
name: "hidden",
|
// name: "hidden",
|
||||||
content: "Hidden",
|
// content: "Hidden",
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
id: 5,
|
// id: 5,
|
||||||
name: "collection",
|
// name: "collection",
|
||||||
content: "Collection",
|
// content: "Collection",
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
id: 6,
|
// id: 6,
|
||||||
name: "activity",
|
// name: "activity",
|
||||||
content: "Activity",
|
// content: "Activity",
|
||||||
},
|
// },
|
||||||
];
|
// ];
|
||||||
|
|
||||||
const [tab, setTab] = useState(tabs[0].name);
|
// const [tab, setTab] = useState(tabs[0].name);
|
||||||
const tabHandler = (value) => {
|
// const tabHandler = (value) => {
|
||||||
setTab(value);
|
// setTab(value);
|
||||||
};
|
// };
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Layout>
|
<Layout>
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
import React, { useEffect } from 'react';
|
import React, { useEffect } from 'react';
|
||||||
import { useLocation, useNavigate } from 'react-router-dom';
|
import { useLocation, useNavigate } from 'react-router-dom';
|
||||||
import usersService from '../../../services/UsersService';
|
// import usersService from '../../../services/UsersService';
|
||||||
import {updateUserDetails} from "../../../store/UserDetails";
|
// import {updateUserDetails} from "../../../store/UserDetails";
|
||||||
import { useDispatch } from "react-redux";
|
// import { useDispatch } from "react-redux";
|
||||||
import AuthLayout from "../AuthLayout";
|
import AuthLayout from "../AuthLayout";
|
||||||
|
|
||||||
function AppleRedirect() {
|
function AppleRedirect() {
|
||||||
const location = useLocation();
|
const location = useLocation();
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const userApi = new usersService();
|
// const userApi = new usersService();
|
||||||
const dispatch = useDispatch()
|
// const dispatch = useDispatch()
|
||||||
|
|
||||||
const queryParams = new URLSearchParams(location?.search);
|
const queryParams = new URLSearchParams(location?.search);
|
||||||
const codeResponse = queryParams.get("code");
|
const codeResponse = queryParams.get("code");
|
||||||
@@ -36,11 +36,11 @@ function AppleRedirect() {
|
|||||||
redirect_uri=https%3A//oauth2.example.com/code&
|
redirect_uri=https%3A//oauth2.example.com/code&
|
||||||
grant_type=authorization_code
|
grant_type=authorization_code
|
||||||
*/
|
*/
|
||||||
var reqData = {
|
// var reqData = {
|
||||||
auth_type: "APPLE",
|
// auth_type: "APPLE",
|
||||||
code: codeResponse,
|
// code: codeResponse,
|
||||||
redirect_uri: process.env.REACT_APP_GOOGLE_REDIRECT_URL,
|
// redirect_uri: process.env.REACT_APP_GOOGLE_REDIRECT_URL,
|
||||||
};
|
// };
|
||||||
// userApi
|
// userApi
|
||||||
// .authStart(reqData)
|
// .authStart(reqData)
|
||||||
// .then((res) => {
|
// .then((res) => {
|
||||||
@@ -58,7 +58,7 @@ function AppleRedirect() {
|
|||||||
// navigate('/login', {state: {error: true}})
|
// navigate('/login', {state: {error: true}})
|
||||||
// console.log(error);
|
// console.log(error);
|
||||||
// });
|
// });
|
||||||
},[])
|
},[codeResponse, navigate])
|
||||||
return (
|
return (
|
||||||
<AuthLayout>
|
<AuthLayout>
|
||||||
<div className='min-h-[70vh]'>Redirecting ... </div>
|
<div className='min-h-[70vh]'>Redirecting ... </div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import React, { useEffect } from 'react';
|
import React, { useMemo, useEffect } from 'react';
|
||||||
import { useDispatch } from "react-redux";
|
import { useDispatch } from "react-redux";
|
||||||
import { useLocation, useNavigate } from 'react-router-dom';
|
import { useLocation, useNavigate } from 'react-router-dom';
|
||||||
import usersService from '../../../services/UsersService';
|
import usersService from '../../../services/UsersService';
|
||||||
@@ -8,7 +8,7 @@ import AuthLayout from "../AuthLayout";
|
|||||||
function FbookRedirect() {
|
function FbookRedirect() {
|
||||||
const location = useLocation();
|
const location = useLocation();
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const userApi = new usersService();
|
const userApi = useMemo(()=> new usersService(),[]);
|
||||||
const dispatch = useDispatch()
|
const dispatch = useDispatch()
|
||||||
|
|
||||||
const queryParams = new URLSearchParams(location?.search);
|
const queryParams = new URLSearchParams(location?.search);
|
||||||
@@ -52,7 +52,7 @@ function FbookRedirect() {
|
|||||||
userApi
|
userApi
|
||||||
.authStart(reqData)
|
.authStart(reqData)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.status == 200 && res.data.internal_return >= 0 && res.data.member_id && res.data.uid && res.data.session) {
|
if (res.status === 200 && res.data.internal_return >= 0 && res.data.member_id && res.data.uid && res.data.session) {
|
||||||
localStorage.setItem("member_id", `${res.data.member_id}`);
|
localStorage.setItem("member_id", `${res.data.member_id}`);
|
||||||
localStorage.setItem("uid", `${res.data.uid}`);
|
localStorage.setItem("uid", `${res.data.uid}`);
|
||||||
localStorage.setItem("session_token", `${res.data.session}`);
|
localStorage.setItem("session_token", `${res.data.session}`);
|
||||||
@@ -66,7 +66,7 @@ function FbookRedirect() {
|
|||||||
navigate('/login', {state: {error: true}})
|
navigate('/login', {state: {error: true}})
|
||||||
console.log(error);
|
console.log(error);
|
||||||
});
|
});
|
||||||
},[])
|
},[codeResponse, userApi, dispatch, navigate])
|
||||||
return (
|
return (
|
||||||
<AuthLayout>
|
<AuthLayout>
|
||||||
<div className='min-h-[70vh]'>Redirecting ... </div>
|
<div className='min-h-[70vh]'>Redirecting ... </div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import React, { useEffect } from "react";
|
import React, { useEffect, useMemo } from "react";
|
||||||
import { useDispatch } from "react-redux";
|
import { useDispatch } from "react-redux";
|
||||||
import { useLocation, useNavigate } from "react-router-dom";
|
import { useLocation, useNavigate } from "react-router-dom";
|
||||||
import usersService from "../../../services/UsersService";
|
import usersService from "../../../services/UsersService";
|
||||||
@@ -8,7 +8,7 @@ import AuthLayout from "../AuthLayout";
|
|||||||
function Redirect() {
|
function Redirect() {
|
||||||
const location = useLocation();
|
const location = useLocation();
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const userApi = new usersService();
|
const userApi = useMemo(()=> new usersService(),[]);
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
|
|
||||||
const queryParams = new URLSearchParams(location?.search);
|
const queryParams = new URLSearchParams(location?.search);
|
||||||
@@ -40,7 +40,7 @@ function Redirect() {
|
|||||||
.authStart(reqData)
|
.authStart(reqData)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (
|
if (
|
||||||
res.status == 200 &&
|
res.status === 200 &&
|
||||||
res.data.internal_return >= 0 &&
|
res.data.internal_return >= 0 &&
|
||||||
res.data.member_id &&
|
res.data.member_id &&
|
||||||
res.data.uid &&
|
res.data.uid &&
|
||||||
@@ -59,7 +59,7 @@ function Redirect() {
|
|||||||
navigate("/login", { state: { error: true } });
|
navigate("/login", { state: { error: true } });
|
||||||
console.log(error);
|
console.log(error);
|
||||||
});
|
});
|
||||||
}, []);
|
}, [codeResponse, userApi, dispatch, navigate]);
|
||||||
return (
|
return (
|
||||||
<AuthLayout>
|
<AuthLayout>
|
||||||
<div className="min-h-[70vh]">Redirecting ... </div>
|
<div className="min-h-[70vh]">Redirecting ... </div>
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ export default function ForgotPassword() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const resetHandler = async () => {
|
const resetHandler = async () => {
|
||||||
if (email == "") {
|
if (email === "") {
|
||||||
setMsgError("An email is required");
|
setMsgError("An email is required");
|
||||||
return setTimeout(() => {
|
return setTimeout(() => {
|
||||||
setMsgError(null);
|
setMsgError(null);
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { Link, useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
import WrenchBoard from "../../../assets/images/wrenchboard-logo-text.png";
|
// import WrenchBoard from "../../../assets/images/wrenchboard-logo-text.png";
|
||||||
import usersService from "../../../services/UsersService";
|
import usersService from "../../../services/UsersService";
|
||||||
import InputCom from "../../Helpers/Inputs/InputCom";
|
import InputCom from "../../Helpers/Inputs/InputCom";
|
||||||
import AuthLayout from "../AuthLayout2";
|
import AuthLayout from "../AuthLayout2";
|
||||||
@@ -38,7 +38,7 @@ export default function ForgotPassword() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const resetHandler = async () => {
|
const resetHandler = async () => {
|
||||||
if (email == "") {
|
if (email === "") {
|
||||||
setMsgError("An email is required");
|
setMsgError("An email is required");
|
||||||
return setTimeout(() => {
|
return setTimeout(() => {
|
||||||
setMsgError(null);
|
setMsgError(null);
|
||||||
|
|||||||
@@ -9,87 +9,12 @@ import LoadingSpinner from '../../components/Spinners/LoadingSpinner'
|
|||||||
|
|
||||||
export default function Home(props) {
|
export default function Home(props) {
|
||||||
// console.log("PROPS IN HOME->", props);
|
// console.log("PROPS IN HOME->", props);
|
||||||
const userApi = new usersService();
|
// const userApi = new usersService();
|
||||||
const { commonHeadBanner } = useSelector((state) => state.commonHeadBanner);
|
const { commonHeadBanner } = useSelector((state) => state.commonHeadBanner);
|
||||||
|
|
||||||
const { userDetails } = useSelector((state) => state?.userDetails);
|
const { userDetails } = useSelector((state) => state?.userDetails);
|
||||||
|
|
||||||
// const [MyActiveJobList, setMyActiveJobList] = useState({loading:true, data:[]}); // STATE TO HOLD ACTIVE/CURRENT TASKS
|
|
||||||
|
|
||||||
// const getMyActiveJobList = async () => { // FUNCTION TO POPULATE ACTIVE/CURRENT TASK LIST
|
|
||||||
// try {
|
|
||||||
// const res = await userApi.getMyActiveTaskList();
|
|
||||||
// setMyActiveJobList({loading:false, data:res?.data?.result_list});
|
|
||||||
// // setMyActiveJobList(res?.data?.result_list);
|
|
||||||
// } catch (error) {
|
|
||||||
// setMyActiveJobList({loading:false, data:[]});
|
|
||||||
// // setMyActiveJobList([]);
|
|
||||||
// console.log("Error getting tasks");
|
|
||||||
// }
|
|
||||||
// };
|
|
||||||
|
|
||||||
// FUNCTION TO GET DASH DATA TO DETERMINE CURRENT TASK DUE TIME
|
|
||||||
// const getHomeDate = () => {
|
|
||||||
// userApi
|
|
||||||
// .getHomeDate()
|
|
||||||
// .then((res) => {
|
|
||||||
// if (res.status != 200 || res.internal_return < 0) {
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
// setNextDueTask(res.data);
|
|
||||||
// })
|
|
||||||
// .catch((error) => {
|
|
||||||
// console.log(error);
|
|
||||||
// });
|
|
||||||
// };
|
|
||||||
|
|
||||||
// const getMyOffersList = async () => {
|
|
||||||
// try {
|
|
||||||
// const res = await userApi.getOffersList();
|
|
||||||
// setMyOffersList({loading:false, data:res.data});
|
|
||||||
// } catch (error) {
|
|
||||||
// setMyOffersList({loading:false, data:[]});
|
|
||||||
// console.log("Error getting offers", error);
|
|
||||||
// }
|
|
||||||
// };
|
|
||||||
|
|
||||||
// useEffect(() => {
|
|
||||||
// if(userDetails?.account_type == 'FULL'){
|
|
||||||
// getMyActiveJobList();
|
|
||||||
// }
|
|
||||||
// }, []);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Layout>
|
<Layout>
|
||||||
{/* {Object.keys(commonHeadBanner).length < 1 ?
|
|
||||||
<LoadingSpinner height='h-48' size='16' />
|
|
||||||
:
|
|
||||||
<div className="w-full">
|
|
||||||
{userDetails && userDetails?.account_type == "FAMILY" ? (
|
|
||||||
<FamilyDash
|
|
||||||
account={userDetails}
|
|
||||||
commonHeadData={props.bannerList}
|
|
||||||
// familyOffers={MyOffersList?.data}
|
|
||||||
serverImg = {userDetails?.session_image_server}
|
|
||||||
// MyActiveJobList={MyActiveJobList?.data}
|
|
||||||
/>
|
|
||||||
) : userDetails && userDetails?.account_type == "FULL" ? (
|
|
||||||
<FullAccountDash
|
|
||||||
bannerList={props.bannerList}
|
|
||||||
dashTypes={props.dashTypes}
|
|
||||||
// offersList={MyOffersList}
|
|
||||||
// MyActiveJobList={MyActiveJobList}
|
|
||||||
offersList={props.offersList}
|
|
||||||
imageServer={props.imageServer}
|
|
||||||
/>
|
|
||||||
) : (
|
|
||||||
<div>
|
|
||||||
You are not logged in or your account type is not supported.
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
} */}
|
|
||||||
|
|
||||||
<div className="w-full">
|
<div className="w-full">
|
||||||
{userDetails && userDetails?.account_type == "FAMILY" ? (
|
{userDetails && userDetails?.account_type == "FAMILY" ? (
|
||||||
<FamilyDash
|
<FamilyDash
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ export default function MarketPlace({ commonHeadData }) {
|
|||||||
const marketData = jobLists?.result_list;
|
const marketData = jobLists?.result_list;
|
||||||
const categories = jobLists?.categories;
|
const categories = jobLists?.categories;
|
||||||
const image_server = jobLists?.session_image_server;
|
const image_server = jobLists?.session_image_server;
|
||||||
console.log('Lenth', marketData?.length )
|
// console.log('Lenth', marketData?.length )
|
||||||
|
|
||||||
useEffect(()=>{
|
useEffect(()=>{
|
||||||
if(!jobLists.loading && (marketData?.length < 1 || !marketData)){
|
if(!jobLists.loading && (marketData?.length < 1 || !marketData)){
|
||||||
|
|||||||
@@ -0,0 +1,60 @@
|
|||||||
|
import React, { useEffect, useState } from "react";
|
||||||
|
import usersService from "../../services/UsersService";
|
||||||
|
import ConfirmNairaWithdraw from "./Popup/ConfirmNairaWithdraw";
|
||||||
|
import NairaWithdraw from "./Popup/NairaWithdraw";
|
||||||
|
import ViewVirtualCardPopout from "./walletvirtual/ViewVirtualCardPopout";
|
||||||
|
import WalletExtraActionBtn from "./WalletExtraActionBtn";
|
||||||
|
|
||||||
|
function VirtualCardAction({ walletItem, payment }) {
|
||||||
|
|
||||||
|
// virtual add card popout
|
||||||
|
const [popup, setPopup] = useState({ show: false, name: '', data: {} });
|
||||||
|
|
||||||
|
/*OPENS the virtual add card popout*/
|
||||||
|
const openPopUp = (name, value) => {
|
||||||
|
setPopup({
|
||||||
|
show: true,
|
||||||
|
name: name,
|
||||||
|
data: { ...value },
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/*Closes the virtual add card popout*/
|
||||||
|
const closePopUp = () => {
|
||||||
|
setPopup({ show: false, name: '', data: {} });
|
||||||
|
// dispatch(tableReload({ type: "WALLETTABLE" }));
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="counters w-full flex justify-end gap-2">
|
||||||
|
|
||||||
|
{/* EXTRA ACTIONS BTN */}
|
||||||
|
<div className="w-1/2 flex justify-end items-center">
|
||||||
|
<button
|
||||||
|
className="logout-btn btn-gradient text-white"
|
||||||
|
onClick={() => {
|
||||||
|
openPopUp('view_card',{
|
||||||
|
payment: payment,
|
||||||
|
currency: walletItem?.description,
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
View Card
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* VIRTUAL CARD POPOUT */}
|
||||||
|
{(popup.show && popup.name=='view_card') && (
|
||||||
|
<ViewVirtualCardPopout
|
||||||
|
details={popup.data}
|
||||||
|
walletItem={walletItem}
|
||||||
|
onClose={closePopUp}
|
||||||
|
situation={popup.show}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default VirtualCardAction;
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
import { useSelector } from "react-redux";
|
|
||||||
import LoadingSpinner from "../Spinners/LoadingSpinner";
|
import LoadingSpinner from "../Spinners/LoadingSpinner";
|
||||||
import WalletItemCard from "./WalletItemCard";
|
import WalletItemCard from "./WalletItemCard";
|
||||||
import WalletItemCardVirtual from './walletvirtual/WalletItemCardVirtual'
|
import WalletItemCardVirtual from './walletvirtual/WalletItemCardVirtual';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Renders a list of wallet items or a loading spinner depending on the state of the `wallet` object.
|
* Renders a list of wallet items or a loading spinner depending on the state of the `wallet` object.
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { useDispatch, useSelector } from "react-redux";
|
import { useDispatch } from "react-redux";
|
||||||
// import background from "../../assets/images/bg-sky-blue.jpg"; //shape/balance-bg.svg";
|
// import background from "../../assets/images/bg-sky-blue.jpg"; //shape/balance-bg.svg";
|
||||||
import localImgLoad from "../../lib/localImgLoad";
|
|
||||||
import { tableReload } from "../../store/TableReloads";
|
import { tableReload } from "../../store/TableReloads";
|
||||||
import { PriceFormatter } from "../Helpers/PriceFormatter";
|
import { PriceFormatter } from "../Helpers/PriceFormatter";
|
||||||
import CreditPopup from "./Popup/CreditPopup";
|
import CreditPopup from "./Popup/CreditPopup";
|
||||||
import WalletAction from "./WalletAction";
|
import WalletAction from "./WalletAction";
|
||||||
|
import VirtualCardAction from "./VirtualCardAction";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Renders a card displaying information about a wallet item.
|
* Renders a card displaying information about a wallet item.
|
||||||
@@ -59,7 +59,7 @@ export default function WalletItemCard({ walletItem, payment, countries }) {
|
|||||||
</div> */}
|
</div> */}
|
||||||
<div className="balance w-full mt-2 flex justify-end">
|
<div className="balance w-full mt-2 flex justify-end">
|
||||||
<div className="flex flex-col items-center">
|
<div className="flex flex-col items-center">
|
||||||
<p className="text-base sm:text-lg text-white tracking-wide mb-2 sm:mb-6">
|
<p className={`${(walletItem?.brand && walletItem?.card_last4) && 'hidden' } text-base sm:text-lg text-white tracking-wide mb-2 sm:mb-6`}>
|
||||||
Current Balance
|
Current Balance
|
||||||
</p>
|
</p>
|
||||||
{walletItem?.brand && walletItem?.card_last4 ? // FOR VIRTUAL CARD NUMBER ELSE WALLET BALANCE DISPLAY
|
{walletItem?.brand && walletItem?.card_last4 ? // FOR VIRTUAL CARD NUMBER ELSE WALLET BALANCE DISPLAY
|
||||||
@@ -80,7 +80,7 @@ export default function WalletItemCard({ walletItem, payment, countries }) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{walletItem.escrow > 0 ?
|
{walletItem.escrow > 0 & (!walletItem?.brand && !walletItem?.card_last4 ) ?
|
||||||
<div className='w-full flex justify-end'>
|
<div className='w-full flex justify-end'>
|
||||||
<p className="text-lg text-white tracking-wide flex justify-center items-center gap-8">
|
<p className="text-lg text-white tracking-wide flex justify-center items-center gap-8">
|
||||||
HOLDINGS :{" "}
|
HOLDINGS :{" "}
|
||||||
@@ -98,6 +98,7 @@ export default function WalletItemCard({ walletItem, payment, countries }) {
|
|||||||
null
|
null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{(!walletItem?.brand || !walletItem?.card_last4) ?
|
||||||
<div className='w-full'>
|
<div className='w-full'>
|
||||||
<div className="w-full h-[1px] mb-2 bg-white"></div>
|
<div className="w-full h-[1px] mb-2 bg-white"></div>
|
||||||
<WalletAction
|
<WalletAction
|
||||||
@@ -106,6 +107,16 @@ export default function WalletItemCard({ walletItem, payment, countries }) {
|
|||||||
openPopUp={openPopUp}
|
openPopUp={openPopUp}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
:
|
||||||
|
<div className='w-full'>
|
||||||
|
<div className="w-full h-[1px] mb-2 bg-white"></div>
|
||||||
|
<VirtualCardAction
|
||||||
|
walletItem={{ ...walletItem, walletCountry: currentWalletCurrency }}
|
||||||
|
payment={payment}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{creditPopup.show && (
|
{creditPopup.show && (
|
||||||
|
|||||||
@@ -0,0 +1,221 @@
|
|||||||
|
import { useEffect, useState } from "react";
|
||||||
|
import { Form, Formik } from "formik";
|
||||||
|
import * as Yup from "yup";
|
||||||
|
import { useSelector } from "react-redux";
|
||||||
|
import ModalCom from "../../Helpers/ModalCom";
|
||||||
|
import LoadingSpinner from "../../Spinners/LoadingSpinner";
|
||||||
|
import CustomTimer from "../../countdown/CustomTimer";
|
||||||
|
import InputCom from '../../Helpers/Inputs/InputCom'
|
||||||
|
import usersService from "../../../services/UsersService";
|
||||||
|
|
||||||
|
|
||||||
|
const validationSchema = Yup.object().shape({
|
||||||
|
|
||||||
|
country: Yup.string()
|
||||||
|
.required("Required"),
|
||||||
|
phone_number: Yup.string()
|
||||||
|
.min(9, "Invalid")
|
||||||
|
.max(11, "Invalid")
|
||||||
|
.required("Required"),
|
||||||
|
address: Yup.string()
|
||||||
|
.min(5, "Min 3 characters")
|
||||||
|
.max(50, "Max 25 characters")
|
||||||
|
.required("Required"),
|
||||||
|
city: Yup.string()
|
||||||
|
.min(2, "Min 3 characters")
|
||||||
|
.max(25, "Max 25 characters")
|
||||||
|
.required("Required"),
|
||||||
|
state: Yup.string()
|
||||||
|
.required("Required"),
|
||||||
|
zipCode: Yup.string()
|
||||||
|
.min(1, "Min 3 characters")
|
||||||
|
.max(8, "Max 8 characters")
|
||||||
|
.required("Required"),
|
||||||
|
dob: Yup.string()
|
||||||
|
.required("Required"),
|
||||||
|
checked: Yup.bool() // use bool instead of boolean
|
||||||
|
.oneOf([true], "You must accept the terms and conditions")
|
||||||
|
});
|
||||||
|
|
||||||
|
const ViewVirtualCardPopout = ({ details, onClose, situation, walletItem }) => {
|
||||||
|
|
||||||
|
const { userDetails } = useSelector((state) => state.userDetails);
|
||||||
|
|
||||||
|
const countryCode = walletItem?.country
|
||||||
|
|
||||||
|
const userApi = new usersService()
|
||||||
|
|
||||||
|
const [requestStatus, setRequestStatus] = useState({loading: false, status:false, message: ''})
|
||||||
|
|
||||||
|
let initialValues = {
|
||||||
|
// initial values for formik
|
||||||
|
country: countryCode ? countryCode : '',
|
||||||
|
phone_number: '',
|
||||||
|
email: userDetails?.email,
|
||||||
|
firstname: userDetails?.firstname,
|
||||||
|
lastname: userDetails?.lastname,
|
||||||
|
birthYear: '',
|
||||||
|
birthMonth: '',
|
||||||
|
birthDay: '',
|
||||||
|
address: '',
|
||||||
|
city: userDetails?.city ? userDetails.city : '',
|
||||||
|
state: '',
|
||||||
|
zipCode: '',
|
||||||
|
dob: '',
|
||||||
|
checked: false
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const handleSubmit = (values) => {
|
||||||
|
let date = new Date(values.dob)
|
||||||
|
const reqData = {
|
||||||
|
request_type: '100',
|
||||||
|
address: values.address,
|
||||||
|
city: values.city,
|
||||||
|
state: values.state,
|
||||||
|
country: values.country,
|
||||||
|
postal_code: values.zipCode,
|
||||||
|
phone_number: values.phone_number,
|
||||||
|
// dob_day: values.birthDay,
|
||||||
|
// dob_month: values.birthMonth,
|
||||||
|
// dob_year: values.birthYear,
|
||||||
|
dob_day: Number(date.getDate()),
|
||||||
|
dob_month: Number(date.getMonth()) + 1,
|
||||||
|
dob_year: Number(date.getFullYear()),
|
||||||
|
dob: values.dob
|
||||||
|
}
|
||||||
|
// console.log('Values', reqData)
|
||||||
|
setRequestStatus({loading: true, status:false, message: ''})
|
||||||
|
userApi.walletCardRequest(reqData).then(res => {
|
||||||
|
if(res?.data?.internal_return < 0){
|
||||||
|
setRequestStatus({loading: false, status:false, message: 'Failed, try again'})
|
||||||
|
setTimeout(()=>{
|
||||||
|
setRequestStatus({loading: false, status:true, message: ''})
|
||||||
|
},4000)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
setRequestStatus({loading: false, status:true, message: 'Successful'})
|
||||||
|
setTimeout(()=>{
|
||||||
|
setRequestStatus({loading: false, status:true, message: ''})
|
||||||
|
onClose()
|
||||||
|
},4000)
|
||||||
|
}).catch(err => {
|
||||||
|
console.log('ERR', err)
|
||||||
|
setRequestStatus({loading: false, status:false, message: 'Unable to complete'})
|
||||||
|
setTimeout(()=>{
|
||||||
|
setRequestStatus({loading: false, status:false, message: ''})
|
||||||
|
},4000)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
useEffect(()=>{
|
||||||
|
// Get Country Api
|
||||||
|
console.log('ok')
|
||||||
|
},[])
|
||||||
|
|
||||||
|
return (
|
||||||
|
<ModalCom
|
||||||
|
action={onClose}
|
||||||
|
situation={situation}
|
||||||
|
>
|
||||||
|
<Formik
|
||||||
|
initialValues={initialValues}
|
||||||
|
validationSchema={validationSchema}
|
||||||
|
onSubmit={handleSubmit}
|
||||||
|
>
|
||||||
|
{(props) => (
|
||||||
|
<div className="logout-modal-wrapper mx-auto w-[90%] md:w-[768px] h-auto bg-white dark:bg-dark-white lg:rounded-2xl overflow-y-auto">
|
||||||
|
<Form className="w-full">
|
||||||
|
<div className="modal-header-con">
|
||||||
|
<h1 className="modal-title">
|
||||||
|
{walletItem?.description}
|
||||||
|
</h1>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
className="modal-close-btn"
|
||||||
|
onClick={onClose}
|
||||||
|
>
|
||||||
|
<svg
|
||||||
|
width="36"
|
||||||
|
height="36"
|
||||||
|
viewBox="0 0 36 36"
|
||||||
|
fill="none"
|
||||||
|
className="fill-current"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
d="M36 16.16C36 17.4399 36 18.7199 36 20.0001C35.7911 20.0709 35.8636 20.2554 35.8385 20.4001C34.5321 27.9453 30.246 32.9248 22.9603 35.2822C21.9006 35.6251 20.7753 35.7657 19.6802 35.9997C18.4003 35.9997 17.1204 35.9997 15.8401 35.9997C15.5896 35.7086 15.2189 35.7732 14.9034 35.7093C7.77231 34.2621 3.08728 30.0725 0.769671 23.187C0.435002 22.1926 0.445997 21.1199 0 20.1599C0 18.7198 0 17.2798 0 15.8398C0.291376 15.6195 0.214408 15.2656 0.270759 14.9808C1.71321 7.69774 6.02611 2.99691 13.0428 0.700951C14.0118 0.383805 15.0509 0.386897 15.9999 0C17.2265 0 18.4532 0 19.6799 0C19.7156 0.124041 19.8125 0.136067 19.9225 0.146719C27.3 0.868973 33.5322 6.21922 35.3801 13.427C35.6121 14.3313 35.7945 15.2484 36 16.16ZM33.011 18.0787C33.0433 9.77105 26.3423 3.00309 18.077 2.9945C9.78479 2.98626 3.00344 9.658 2.98523 17.8426C2.96667 26.1633 9.58859 32.9601 17.7602 33.0079C26.197 33.0577 32.9787 26.4186 33.011 18.0787Z"
|
||||||
|
fill=""
|
||||||
|
fillOpacity="0.6"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
d="M15.9309 18.023C13.9329 16.037 12.007 14.1207 10.0787 12.2072C9.60071 11.733 9.26398 11.2162 9.51996 10.506C9.945 9.32677 11.1954 9.0811 12.1437 10.0174C13.9067 11.7585 15.6766 13.494 17.385 15.2879C17.9108 15.8401 18.1633 15.7487 18.6375 15.258C20.3586 13.4761 22.1199 11.7327 23.8822 9.99096C24.8175 9.06632 26.1095 9.33639 26.4967 10.517C26.7286 11.2241 26.3919 11.7413 25.9133 12.2178C24.1757 13.9472 22.4477 15.6855 20.7104 17.4148C20.5228 17.6018 20.2964 17.7495 20.0466 17.9485C22.0831 19.974 24.0372 21.8992 25.9689 23.8468C26.9262 24.8119 26.6489 26.1101 25.4336 26.4987C24.712 26.7292 24.2131 26.3441 23.7455 25.8757C21.9945 24.1227 20.2232 22.3892 18.5045 20.6049C18.0698 20.1534 17.8716 20.2269 17.4802 20.6282C15.732 22.4215 13.9493 24.1807 12.1777 25.951C11.7022 26.4262 11.193 26.7471 10.4738 26.4537C9.31345 25.9798 9.06881 24.8398 9.98589 23.8952C11.285 22.5576 12.6138 21.2484 13.9387 19.9355C14.5792 19.3005 15.2399 18.6852 15.9309 18.023Z"
|
||||||
|
fill="#"
|
||||||
|
fillOpacity="0.6"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div className='h-[22rem]'></div>
|
||||||
|
{requestStatus.message &&
|
||||||
|
<div className='px-4 my-1'>
|
||||||
|
<p className={`text-center text-base py-1 font-bold ${requestStatus.status ? 'bg-emerald-600 text-white' : 'bg-red-100 text-red-600'}`}>{requestStatus.message}</p>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
<div className="modal-footer-wrapper grid grid-cols-1 xxs:grid-cols-3">
|
||||||
|
<div className="w-full col-span-1 xxs:col-span-2 xxs:col-start-2 flex justify-between items-center">
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
onClick={onClose}
|
||||||
|
className="custom-btn bg-[#f5a430] text-black text-base"
|
||||||
|
>
|
||||||
|
Cancel
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<>
|
||||||
|
{requestStatus.loading ?
|
||||||
|
<LoadingSpinner size="6" color="sky-blue" />
|
||||||
|
:
|
||||||
|
<button
|
||||||
|
type="submit"
|
||||||
|
className="custom-btn btn-gradient text-base text-white"
|
||||||
|
disabled={requestStatus.loading || requestStatus.status}
|
||||||
|
>
|
||||||
|
Continue
|
||||||
|
</button>
|
||||||
|
}
|
||||||
|
</>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</Form>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</Formik>
|
||||||
|
</ModalCom>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default ViewVirtualCardPopout;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const day = new Array(31).fill(0).map((_,i) => i+1 )
|
||||||
|
|
||||||
|
const month = [
|
||||||
|
{value: 1, name: 'January'},
|
||||||
|
{value: 2, name: 'February'},
|
||||||
|
{value: 3, name: 'March'},
|
||||||
|
{value: 4, name: 'April'},
|
||||||
|
{value: 5, name: 'May'},
|
||||||
|
{value: 6, name: 'June'},
|
||||||
|
{value: 7, name: 'July'},
|
||||||
|
{value: 8, name: 'August'},
|
||||||
|
{value: 9, name: 'September'},
|
||||||
|
{value: 10, name: 'October'},
|
||||||
|
{value: 11, name: 'November'},
|
||||||
|
{value: 12, name: 'December'},
|
||||||
|
]
|
||||||
|
|
||||||
|
const date = new Date().getFullYear()
|
||||||
|
|
||||||
|
const year = new Array(100).fill(0).map((_,i) => (date-2) - i+1 )
|
||||||
+4
-2
@@ -1,4 +1,4 @@
|
|||||||
import React from "react";
|
import React ,{Suspense} from "react";
|
||||||
import ReactDOM from "react-dom/client";
|
import ReactDOM from "react-dom/client";
|
||||||
import { Provider } from "react-redux";
|
import { Provider } from "react-redux";
|
||||||
import { BrowserRouter } from "react-router-dom";
|
import { BrowserRouter } from "react-router-dom";
|
||||||
@@ -13,7 +13,9 @@ ReactDOM.createRoot(root).render(
|
|||||||
<BrowserRouter>
|
<BrowserRouter>
|
||||||
<Provider store={store}>
|
<Provider store={store}>
|
||||||
<GoogleOAuthProvider clientId={process.env.REACT_APP_GOOGLE_CLIENT_ID}>
|
<GoogleOAuthProvider clientId={process.env.REACT_APP_GOOGLE_CLIENT_ID}>
|
||||||
<App />
|
<Suspense>
|
||||||
|
<App />
|
||||||
|
</Suspense>
|
||||||
</GoogleOAuthProvider>
|
</GoogleOAuthProvider>
|
||||||
</Provider>
|
</Provider>
|
||||||
</BrowserRouter>
|
</BrowserRouter>
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
import React from 'react'
|
||||||
|
import SocketIOContextProvider from '../components/Contexts/SocketIOContext'
|
||||||
|
import { Navigate, Outlet, useNavigate } from "react-router-dom";
|
||||||
|
|
||||||
|
export default function SocketConnection() {
|
||||||
|
return (
|
||||||
|
<SocketIOContextProvider>
|
||||||
|
<Outlet />
|
||||||
|
</SocketIOContextProvider>
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -4,11 +4,8 @@ import Home from "../components/Home";
|
|||||||
|
|
||||||
export default function HomePages() {
|
export default function HomePages() {
|
||||||
const { commonHeadBanner } = useSelector((state) => state.commonHeadBanner);
|
const { commonHeadBanner } = useSelector((state) => state.commonHeadBanner);
|
||||||
|
|
||||||
const [bannerOptions, setBannerOptions] = useState({})
|
const [bannerOptions, setBannerOptions] = useState({})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
useEffect(()=>{
|
useEffect(()=>{
|
||||||
const bannerOptions = {
|
const bannerOptions = {
|
||||||
bannerList: commonHeadBanner?.result_list,
|
bannerList: commonHeadBanner?.result_list,
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ export default function MyWalletPage() {
|
|||||||
|
|
||||||
useEffect(()=>{
|
useEffect(()=>{
|
||||||
let walletExist = wallet_available_status || localStorage.getItem('wallet_available_status')
|
let walletExist = wallet_available_status || localStorage.getItem('wallet_available_status')
|
||||||
console.log(walletExist)
|
// console.log(walletExist)
|
||||||
if(account_type == 'FULL' && walletExist != 'WALLET_AVAILABLE'){
|
if(account_type == 'FULL' && walletExist != 'WALLET_AVAILABLE'){
|
||||||
navigate('/', {replace: true})
|
navigate('/', {replace: true})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import React, { useContext, useState, useEffect } from "react";
|
import React, { useMemo, useState, useEffect } from "react";
|
||||||
// import BlogItem from "../components/Blogs";
|
// import BlogItem from "../components/Blogs";
|
||||||
import { useSelector } from "react-redux";
|
import { useSelector } from "react-redux";
|
||||||
import OffersInterest from "../components/OffersInterest";
|
import OffersInterest from "../components/OffersInterest";
|
||||||
@@ -15,7 +15,7 @@ export default function OffersInterestPage() {
|
|||||||
|
|
||||||
let {joinRoom} = SocketValues() // function to join room for socket
|
let {joinRoom} = SocketValues() // function to join room for socket
|
||||||
|
|
||||||
const apiCall = new usersService()
|
const apiCall = useMemo(()=> new usersService(),[])
|
||||||
|
|
||||||
let {commonHeadBanner} = useSelector(state => state.commonHeadBanner)
|
let {commonHeadBanner} = useSelector(state => state.commonHeadBanner)
|
||||||
|
|
||||||
@@ -28,11 +28,11 @@ export default function OffersInterestPage() {
|
|||||||
setOfferInterestList({loading: false, data: [], imgServer:''})
|
setOfferInterestList({loading: false, data: [], imgServer:''})
|
||||||
console.log('Error: ', err)
|
console.log('Error: ', err)
|
||||||
})
|
})
|
||||||
},[offerInterestListReload])
|
},[apiCall, offerInterestListReload])
|
||||||
|
|
||||||
useEffect(()=>{
|
useEffect(()=>{
|
||||||
joinRoom(`INTEREST-${userDetails?.uid}`)
|
joinRoom(`INTEREST-${userDetails?.uid}`)
|
||||||
},[])
|
},[joinRoom, userDetails])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|||||||
+12
-12
@@ -1,22 +1,22 @@
|
|||||||
import React, { useState, useEffect } from "react";
|
import React, { useCallback, useMemo, useState, useEffect } from "react";
|
||||||
import Resources from "../components/Resources";
|
import Resources from "../components/Resources";
|
||||||
import usersService from "../services/UsersService";
|
import usersService from "../services/UsersService";
|
||||||
import { useLocation } from "react-router-dom";
|
import { useLocation } from "react-router-dom";
|
||||||
export default function ResourcePage() {
|
export default function ResourcePage() {
|
||||||
const {state, pathname} = useLocation() // CHECKS IF THERE IS AN ACTIVE TAB WITH LINK BACK TO RESOURCES
|
const {state} = useLocation() // CHECKS IF THERE IS AN ACTIVE TAB WITH LINK BACK TO RESOURCES
|
||||||
const [MyResourceData, setMyResourceData] = useState([]);
|
const [MyResourceData, setMyResourceData] = useState([]);
|
||||||
const api = new usersService();
|
const api = useMemo(()=> new usersService(),[]);
|
||||||
const getMyResourceData = async () => {
|
const getMyResourceData = useCallback( async () => {
|
||||||
try {
|
try {
|
||||||
const res = await api.getResourceList();
|
const res = await api.getResourceList();
|
||||||
setMyResourceData(res.data);
|
setMyResourceData(res.data);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
throw new Error("Error getting mode");
|
throw new Error("Error getting mode");
|
||||||
}
|
}
|
||||||
};
|
},[api])
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
getMyResourceData();
|
getMyResourceData();
|
||||||
}, []);
|
}, [getMyResourceData]);
|
||||||
|
|
||||||
return <Resources MyResourceData={MyResourceData} activeTab={state ? state.tab : ''} />;
|
return <Resources MyResourceData={MyResourceData} activeTab={state ? state.tab : ''} />;
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user