Compare commits

...

20 Commits

Author SHA1 Message Date
victorAnumudu aaf98caf19 Merge master into wallet-log-removal 2024-11-21 19:22:07 +01:00
Victor 3326a61a1f log removal 2024-11-21 19:17:36 +01:00
CHIEFSOFT\ameye 5d4033348c Removed deebug tools 2024-11-21 12:16:36 -05:00
ameye 9fb7bb3ed9 Merge branch 'build_bug_fix' of WrenchBoard/Users-Wrench into master 2024-11-21 17:11:45 +00:00
CHIEFSOFT\ameye 4e9f95e59e new alphine 2024-11-20 23:08:14 -05:00
CHIEFSOFT\ameye a35394c546 fix lazy load 2024-11-20 22:06:58 -05:00
CHIEFSOFT\ameye 5e1c22674a correct files 2024-11-20 21:51:07 -05:00
CHIEFSOFT\ameye 1f58eec668 Dev test 2024-11-20 21:47:48 -05:00
CHIEFSOFT\ameye a161453752 run in sh 2024-11-20 21:35:57 -05:00
CHIEFSOFT\ameye 823fea91fb routes issues 2024-11-20 21:32:44 -05:00
CHIEFSOFT\ameye ff88b5ddb2 non lazy 2024-11-20 21:28:11 -05:00
CHIEFSOFT\ameye 55c99f1c33 Added lazy loading 2024-11-20 21:13:28 -05:00
CHIEFSOFT\ameye 334357bdc1 user web 2024-11-20 14:43:01 -05:00
Victor b6908b84af fixed some build bug issues 2024-11-20 19:24:19 +01:00
CHIEFSOFT\ameye 4ef031a03f tesmpoary reomved 2024-11-20 12:39:46 -05:00
CHIEFSOFT\ameye f5eef3f679 make production only 2024-11-20 11:59:08 -05:00
CHIEFSOFT\ameye 339a0063ce temporary 2024-11-20 11:52:40 -05:00
CHIEFSOFT\ameye e1ffca88af Return vack 2024-11-20 11:41:18 -05:00
CHIEFSOFT\ameye 96f3e3ed18 temporary use 2024-11-20 11:35:40 -05:00
ameye 49b10cc57b Merge branch 'more_log_removal' of WrenchBoard/Users-Wrench into master 2024-11-20 15:11:36 +00:00
27 changed files with 146 additions and 113 deletions
+1
View File
@@ -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"
+1
View File
@@ -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"
+1
View File
@@ -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
View File
@@ -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 . ./
+2 -1
View File
@@ -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",
@@ -30,8 +31,8 @@
"react-to-print": "^2.14.12", "react-to-print": "^2.14.12",
"react-toastify": "^9.0.1", "react-toastify": "^9.0.1",
"redux": "^4.2.0", "redux": "^4.2.0",
"socket.io-client": "^4.4.1",
"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"
}, },
+2 -2
View File
@@ -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",
+2
View File
@@ -14,6 +14,8 @@ else
echo "Production build" echo "Production build"
npm install --legacy-peer-deps npm install --legacy-peer-deps
npm run build npm run build
# 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
+5
View File
@@ -4,6 +4,11 @@ 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 SocketIOContextProvider from "./components/Contexts/SocketIOContext";
import { disableReactDevTools } from '@fvilers/disable-react-devtools';
if (process.env.REACT_APP_NODE_ENV === 'production') {
disableReactDevTools();
}
function App() { function App() {
const { pathname } = useLocation(); const { pathname } = useLocation();
return ( return (
+74 -72
View File
@@ -1,83 +1,85 @@
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 MyActiveJobsPage from "./views/MyActiveJobsPage";
import MyCouponPage from "./views/MyCouponPage"; const FourZeroFour = lazy(() => import("./components/FourZeroFour"));
import MyJobsPage from "./views/MyJobsPage"; const ScrollToTop = lazy(() => import("./components/Helpers/ScrollToTop"));
import MyOffersPage from "./views/MyOffersPage"; const StartJob = lazy(() => import("./components/MyJobs/StartJob"));
import MyPastDueJobsPage from "./views/MyPastDueJobsPage"; const Notification = lazy(() => import("./components/Notification"));
import MyReviewDueJobsPage from "./views/MyReviewDueJobsPage"; const AuthRoute = lazy(() => import("./middleware/AuthRoute"));
import MyTaskPage from "./views/MyTaskPage"; const AppDownloadPage = lazy(() => import("./views/AppDownloadPage"));
import MyWaitingJobsPage from "./views/MyWaitingJobsPage"; const AppleRedirectPage = lazy(() => import("./views/AppleRedirectPage"));
import MyWalletPage from "./views/MyWalletPage"; const AuthProfilePage = lazy(() => import("./views/AuthProfilePage"));
import OffersInterestPage from "./views/OffersInterestPage"; const AuthRedirect = lazy(() => import("./views/AuthRedirect"));
import ReferralPage from "./views/ReferralPage"; const BlogPage = lazy(() => import("./views/BlogPage"));
import RemindersPage from "./views/RemindersPage"; const CalendarPage = lazy(() => import("./views/CalendarPage"));
import ResourcePage from "./views/ResourcePage"; const CollectionItemPage = lazy(() => import("./views/CollectionItemPage"));
import SavedPage from "./views/SavedPage"; const FacebookRedirect = lazy(() => import("./views/FacebookRedirect"));
import SellPage from "./views/SellPage"; const FamilyManagePage = lazy(() => import("./views/FamilyManagePage"));
import SettingsPage from "./views/SettingsPage"; const FamilyMarketPage = lazy(() => import("./views/FamilyMarketPage"));
import SignupPage from "./views/SignupPage";
import SignupPageTwo from "./views/SignupPageTwo"; const ForgotPasswordPages = lazy(()=> import("./views/ForgotPasswordPages"));
import TrackingPage from "./views/TrackingPage"; const ForgotPasswordPagesTwo = lazy(()=> import("./views/ForgotPasswordPagesTwo"));
import UpdatePasswordPages from "./views/UpdatePasswordPages"; const HistoryPage = lazy(()=> import("./views/HistoryPage"));
import UpdatePasswordPagesTwo from "./views/UpdatePasswordPagesTwo"; const JobGroupsPage = lazy(()=> import("./views/JobGroupsPage"));
import UploadProductPage from "./views/UploadProductPage"; const LndPage = lazy(()=> import("./views/LndPage"));
import UserProfilePage from "./views/UserProfilePage"; const LoginPageTwo = lazy(()=> import("./views/LoginPageTwo"));
import VerifyLinkPages from "./views/VerifyLinkPages"; const ManageActiveJobs = lazy(()=> import("./views/ManageActiveJobs"));
import VerifyLinkPagesTwo from "./views/VerifyLinkPagesTwo"; const ManageInterestOfferPage = lazy(()=> import("./views/ManageInterestOfferPage"));
import VerifyPasswordPages from "./views/VerifyPasswordPages"; const MarketPlacePage = lazy(()=> import("./views/MarketPlacePage"));
import VerifyPasswordPagesTwo from "./views/VerifyPasswordPagesTwo"; const MyActiveJobsPage = lazy(()=> import("./views/MyActiveJobsPage"));
import VerifyYouPages from "./views/VerifyYouPages"; const MyCouponPage = lazy(()=> import("./views/MyCouponPage"));
import VerifyYouPagesTwo from "./views/VerifyYouPagesTwo"; const MyJobsPage = lazy(()=> import("./views/MyJobsPage"));
import YourPages from "./views/YourPage_"; const MyOffersPage = lazy(()=> import("./views/MyOffersPage"));
import ParentWaitingPage from "./views/ParentWaitingPage"; const MyPastDueJobsPage = lazy(()=> import("./views/MyPastDueJobsPage"));
import FamilyPendingOfferPage from "./views/FamilyPendingOfferPage"; const MyReviewDueJobsPage = lazy(()=> import("./views/MyReviewDueJobsPage"));
import FamBlogPage from "./views/FamBlogPage" const MyTaskPage = lazy(()=> import("./views/MyTaskPage"));
import FamAIQuestionPage from "./views/FamAIQuestionPage" const MyWaitingJobsPage = lazy(()=> import("./views/MyWaitingJobsPage"));
import FamMyFilesPage from "./views/FamMyFilesPage" const MyWalletPage = lazy(()=> import("./views/MyWalletPage"));
import FamWorkInProgressPage from "./views/FamWorkInProgressPage"; const OffersInterestPage = lazy(()=> import("./views/OffersInterestPage"));
import MyPastDueTasksPage from "./views/MyPastDueTasksPage"; const ReferralPage = lazy(()=> import("./views/ReferralPage"));
import FamilyWalletPage from "./views/FamilyWalletPage"; const RemindersPage = lazy(()=> import("./views/RemindersPage"));
import FamilyActivitiesPage from "./views/FamilyActivitiesPage"; const ResourcePage = lazy(()=> import("./views/ResourcePage"));
import FamGamesPage from "./views/FamGamesPage"; const SavedPage = lazy(()=> import("./views/SavedPage"));
import FamilyRoutesPage from "./views/FamilyRoutesPage"; const SellPage = lazy(()=> import("./views/SellPage"));
import PromoPage from "./views/PromoPage"; const SettingsPage = lazy(()=> import("./views/SettingsPage"));
import LearnMorePage from "./views/LearnMorePage"; 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 (
<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 />} />
@@ -16,11 +16,12 @@ import IOSDownload from '../../../assets/images/download/apple.jpg'
export default function LoginLanding() { export default function LoginLanding() {
const dispatch = useDispatch();
const location = useLocation();
const queryParams = new URLSearchParams(location?.search); const queryParams = new URLSearchParams(location?.search);
// const sessionExpired = queryParams.get("sessionExpired"); // const sessionExpired = queryParams.get("sessionExpired");
const dispatch = useDispatch();
const { state } = useLocation();
const navigate = useNavigate(); const navigate = useNavigate();
const userApi = new usersService(); const userApi = new usersService();
+4 -3
View File
@@ -17,12 +17,13 @@ import { updateUserDetails } from "../../../store/UserDetails";
import ReCAPTCHA from "react-google-recaptcha"; import ReCAPTCHA from "react-google-recaptcha";
export default function Login() { export default function Login() {
const dispatch = useDispatch();
const location = useLocation();
// eslint-disable-next-line no-restricted-globals // eslint-disable-next-line no-restricted-globals
const queryParams = new URLSearchParams(location?.search); const queryParams = new URLSearchParams(location?.search);
// const sessionExpired = queryParams.get("sessionExpired"); // const sessionExpired = queryParams.get("sessionExpired");
const dispatch = useDispatch();
const { state } = useLocation();
const [sessionExpired, setSessionExpired] = useState(queryParams.get("sessionExpired")) const [sessionExpired, setSessionExpired] = useState(queryParams.get("sessionExpired"))
@@ -220,7 +221,7 @@ export default function Login() {
let loginValue = readCookie("loginType"); let loginValue = readCookie("loginType");
setLoginType(loginValue); setLoginType(loginValue);
if (state?.error) { if (location?.state?.error) {
//check if the login path has an error state indicating any social handle login with error //check if the login path has an error state indicating any social handle login with error
setMsgError("Unexpected Error, Please try again soon."); setMsgError("Unexpected Error, Please try again soon.");
setTimeout(() => { setTimeout(() => {
+5 -4
View File
@@ -20,12 +20,13 @@ 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 Login() { export default function Login() {
const dispatch = useDispatch();
const location = useLocation();
// eslint-disable-next-line no-restricted-globals // eslint-disable-next-line no-restricted-globals
const queryParams = new URLSearchParams(location?.search); const queryParams = new URLSearchParams(location?.search);
// const sessionExpired = queryParams.get("sessionExpired"); // const sessionExpired = queryParams.get("sessionExpired");
const dispatch = useDispatch();
const { state } = useLocation();
const [sessionExpired, setSessionExpired] = useState( const [sessionExpired, setSessionExpired] = useState(
queryParams.get("sessionExpired") queryParams.get("sessionExpired")
@@ -200,8 +201,8 @@ export default function Login() {
// }, []); // }, []);
useEffect(()=>{ useEffect(()=>{
if(state && state.loginType){ if(location?.state && location?.state.loginType){
setLoginType(state.loginType) setLoginType(location?.state.loginType)
}else{ }else{
navigate('/login', {replace: true}) navigate('/login', {replace: true})
} }
+3 -2
View File
@@ -6,12 +6,13 @@ import InputCom from "../../Helpers/Inputs/InputCom";
import AuthLayout from "../AuthLayout"; import AuthLayout from "../AuthLayout";
export default function SignUp() { export default function SignUp() {
const location = useLocation()
// eslint-disable-next-line no-restricted-globals // eslint-disable-next-line no-restricted-globals
const queryParams = new URLSearchParams(location?.search); const queryParams = new URLSearchParams(location?.search);
const country = queryParams.get("cnt")?.toUpperCase(); const country = queryParams.get("cnt")?.toUpperCase();
const {pathname} = useLocation() const currentPath = country ? `${location?.pathname}?cnt=${country.toLowerCase()}`:location?.pathname // Determines the new pathname is country query params exist
const currentPath = country ? `${pathname}?cnt=${country.toLowerCase()}`:pathname // Determines the new pathname is country query params exist
const [signUpLoading, setSignUpLoading] = useState(false); const [signUpLoading, setSignUpLoading] = useState(false);
const [checked, setValue] = useState(false); const [checked, setValue] = useState(false);
+4 -3
View File
@@ -9,14 +9,15 @@ 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() { export default function SignUp() {
const location = useLocation();
// eslint-disable-next-line no-restricted-globals // eslint-disable-next-line no-restricted-globals
const queryParams = new URLSearchParams(location?.search); const queryParams = new URLSearchParams(location?.search);
const country = queryParams.get("cnt")?.toUpperCase(); const country = queryParams.get("cnt")?.toUpperCase();
const { pathname } = useLocation();
const currentPath = country const currentPath = country
? `${pathname}?cnt=${country.toLowerCase()}` ? `${location?.pathname}?cnt=${country.toLowerCase()}`
: pathname; // Determines the new pathname is country query params exist : location?.pathname; // Determines the new pathname is country query params exist
const [signUpLoading, setSignUpLoading] = useState(false); const [signUpLoading, setSignUpLoading] = useState(false);
const [checked, setValue] = useState(false); const [checked, setValue] = useState(false);
+3 -1
View File
@@ -1,6 +1,6 @@
import React, { useEffect, useState } from "react"; import React, { useEffect, useState } from "react";
import { useSelector } from "react-redux"; import { useSelector } from "react-redux";
import { useNavigate } from "react-router-dom"; import { useNavigate, useLocation } from "react-router-dom";
import usersService from "../../services/UsersService"; import usersService from "../../services/UsersService";
import CustomBreadcrumb from "../Breadcrumb/CustomBreadcrumb"; import CustomBreadcrumb from "../Breadcrumb/CustomBreadcrumb";
import Layout from "../Partials/Layout"; import Layout from "../Partials/Layout";
@@ -9,6 +9,8 @@ import CommonHead from "../UserHeader/CommonHead";
export default function BlogItem(props) { export default function BlogItem(props) {
const location = useLocation()
const { const {
userDetails: { account_type }, userDetails: { account_type },
} = useSelector((state) => state?.userDetails); // CHECKS IF USER Details account type } = useSelector((state) => state?.userDetails); // CHECKS IF USER Details account type
@@ -105,7 +105,7 @@ const RelativePopout = ({
const isChecked = relativeSettings?.data?.filter(value => value?.family_uid == item?.family_uid) const isChecked = relativeSettings?.data?.filter(value => value?.family_uid == item?.family_uid)
const image = localStorage.getItem("session_token") ? `${familyList?.imageServer}${localStorage.getItem("session_token")}/family/${item?.family_uid}` : ""; const image = localStorage.getItem("session_token") ? `${familyList?.imageServer}${localStorage.getItem("session_token")}/family/${item?.family_uid}` : "";
return ( return (
<div key={item.family_uid || index} className="flex items-center border-b dark:border-[#5356fb29] hover:bg-gray-50"> <div key={item.family_uid} className="flex items-center border-b dark:border-[#5356fb29] hover:bg-gray-50">
<div className='p-2 flex justify-center items-center'> <div className='p-2 flex justify-center items-center'>
{relativeEditKids.loading && relativeEditKids.family_uid == item.family_uid? {relativeEditKids.loading && relativeEditKids.family_uid == item.family_uid?
<LoadingSpinner size='4' color='bg-sky-500' /> <LoadingSpinner size='4' color='bg-sky-500' />
@@ -122,7 +122,7 @@ const RelativePopout = ({
<div className="flex space-x-2 items-center w-full"> <div className="flex space-x-2 items-center w-full">
<div className="min-w-[30px] min-h-[30px] max-w-[30px] max-h-[30px] rounded-full overflow-hidden flex justify-center items-center"> <div className="min-w-[30px] min-h-[30px] max-w-[30px] max-h-[30px] rounded-full overflow-hidden flex justify-center items-center">
<img <img
src={image || localImgLoad(`images/icons/${banner}`)} src={image || localImgLoad(`images/icons/family.svg`)}
alt={`Avatar`} alt={`Avatar`}
className="w-full h-full" className="w-full h-full"
/> />
+1 -1
View File
@@ -18,7 +18,7 @@ export default function FamilyTableNew() {
const { jobListTable, pendingListTable, parentFamilyTaskList } = useSelector((state) => state.tableReload); // TABLE RELOAD TRIGGERS const { jobListTable, pendingListTable, parentFamilyTaskList } = useSelector((state) => state.tableReload); // TABLE RELOAD TRIGGERS
let { pathname } = useLocation(); let location = useLocation();
const queryParams = new URLSearchParams(location?.search); const queryParams = new URLSearchParams(location?.search);
const preSelectedTab = queryParams.get("tab"); const preSelectedTab = queryParams.get("tab");
@@ -91,7 +91,7 @@ function Wallet({wallet, familyData, setFamilyWalletReload}) {
action == 'ADD_VIRTUAL_CARD' ? action == 'ADD_VIRTUAL_CARD' ?
openVirtualPopUp({wallet}) openVirtualPopUp({wallet})
: :
null ()=>{}
}} }}
className={`w-[150px] h-[48px] rounded-full text-base text-white bg-[#4687ba] hover:bg-[#009ef7]`} className={`w-[150px] h-[48px] rounded-full text-base text-white bg-[#4687ba] hover:bg-[#009ef7]`}
> >
@@ -10,13 +10,14 @@ import ActiveJobMessageMedia from "./ActiveJobMessageMedia";
import IndexJobActions from "./JobActions/IndexJobActions"; import IndexJobActions from "./JobActions/IndexJobActions";
import MediaLayout from "../Partials/MediaLayout"; import MediaLayout from "../Partials/MediaLayout";
const VideoElement = lazy(() => import("../VideoCom/VideoElement"));
import usersService from "../../services/UsersService"; import usersService from "../../services/UsersService";
import { PriceFormatter } from "../Helpers/PriceFormatter"; import { PriceFormatter } from "../Helpers/PriceFormatter";
import { SocketValues } from "../Contexts/SocketIOContext"; import { SocketValues } from "../Contexts/SocketIOContext";
import TabButton from "../customTabs/TabButton"; import TabButton from "../customTabs/TabButton";
const VideoElement = lazy(() => import("../VideoCom/VideoElement"));
function ActiveJobsMedia(props) { function ActiveJobsMedia(props) {
let {sendMessage, joinRoom} = SocketValues() // destructures 'SEND MESSAGE' and 'JOIN ROOM' FUNCTIONS FROM SOCKET let {sendMessage, joinRoom} = SocketValues() // destructures 'SEND MESSAGE' and 'JOIN ROOM' FUNCTIONS FROM SOCKET
+1 -1
View File
@@ -52,7 +52,7 @@ function WalletAction({ walletItem, payment, openPopUp }) {
: action == 'ADD_VIRTUAL_CARD' ? : action == 'ADD_VIRTUAL_CARD' ?
openVirtualPopUp({walletItem}) openVirtualPopUp({walletItem})
: :
null ()=>{}
}} }}
className={`${ className={`${
walletItem?.code != "NAIRA" && "" walletItem?.code != "NAIRA" && ""
@@ -399,7 +399,8 @@ export default function ManageInterestOffer(props) {
<div className='mb-4 border-b-2 flex flex-col xxs:flex-row md:flex-col justify-center items-center gap-4'> <div className='mb-4 border-b-2 flex flex-col xxs:flex-row md:flex-col justify-center items-center gap-4'>
<div className='w-full flex flex-col lg:flex-row justify-center items-center gap-2'> <div className='w-full flex flex-col lg:flex-row justify-center items-center gap-2'>
<p className="text-lg font-bold text-dark-gray dark:text-white tracking-wide">Wallet:</p> <p className="text-lg font-bold text-dark-gray dark:text-white tracking-wide">Wallet:</p>
<span className="font-medium text-dark-gray dark:text-white">{ walletDetails?.loading ? 'loading...' : PriceFormatter(walletBal[0]?.amount * 0.01,props?.offerDetails?.currency_code,props?.offerDetails?.currency)}</span> {/* <span className="font-medium text-dark-gray dark:text-white">{ walletDetails?.loading ? 'loading...' : PriceFormatter(walletBal[0]?.amount * 0.01,props?.offerDetails?.currency_code,props?.offerDetails?.currency)}</span> */}
<span className="font-medium text-dark-gray dark:text-white">{ walletBal.length > 0 ? PriceFormatter(walletBal[0]?.amount * 0.01,props?.offerDetails?.currency_code,props?.offerDetails?.currency) : 'loading...'}</span>
</div> </div>
<div className='w-full flex flex-col lg:flex-row justify-center items-center gap-2'> <div className='w-full flex flex-col lg:flex-row justify-center items-center gap-2'>
<p className="text-lg font-bold text-dark-gray dark:text-white tracking-wide">Reward:</p> <p className="text-lg font-bold text-dark-gray dark:text-white tracking-wide">Reward:</p>
+3
View File
@@ -1,8 +1,11 @@
import React, { useEffect, useState } from "react"; import React, { useEffect, useState } from "react";
import {useLocation} from 'react-router-dom'
import DarkModeContext from "../Contexts/DarkModeContext"; import DarkModeContext from "../Contexts/DarkModeContext";
import axios from 'axios' import axios from 'axios'
function Default({ children }) { function Default({ children }) {
const location = useLocation()
// dark mode setup // dark mode setup
const [theme, setTheme] = useState(null); const [theme, setTheme] = useState(null);
+9 -9
View File
@@ -11,7 +11,7 @@ import { useReactToPrint } from 'react-to-print'
const Iframe = lazy(() => import("../Iframe/Iframe")); const Iframe = lazy(() => import("../Iframe/Iframe"));
export default function FamGames() { export default function FamGames(props) {
const ApiCall = new usersService(); const ApiCall = new usersService();
const navigate = useNavigate(); const navigate = useNavigate();
@@ -40,7 +40,7 @@ export default function FamGames() {
// FUNCTION TO HANDLE POPOUT // FUNCTION TO HANDLE POPOUT
const popUpHandler = () => { const popUpHandler = () => {
setPopUp((prev) => !prev); // setPopUp((prev) => !prev);
}; };
// FUNCTION TO HANDLE MESSAGE CHANGE // FUNCTION TO HANDLE MESSAGE CHANGE
@@ -136,7 +136,7 @@ export default function FamGames() {
message: "Message Sent Successfully", message: "Message Sent Successfully",
}); });
// function to trigger socket to emit 'send_message' // function to trigger socket to emit 'send_message'
sendMessage(messageToSend, `${props.details.contract}-${props.details.contract_uid}`) // sendMessage(messageToSend, `${props.details.contract}-${props.details.contract_uid}`)
props.reloadActiveJobList((prev) => !prev); // MAKES ACTIVE JOB MESSAGE LIST TO RELOAD props.reloadActiveJobList((prev) => !prev); // MAKES ACTIVE JOB MESSAGE LIST TO RELOAD
setMessageToSend(""); // SENDS MESSAGE TO SEND BACK TO EMPTY STRINGS setMessageToSend(""); // SENDS MESSAGE TO SEND BACK TO EMPTY STRINGS
@@ -176,12 +176,12 @@ export default function FamGames() {
const fileToBase64 = async () => { const fileToBase64 = async () => {
// Converts file data to base64 string // Converts file data to base64 string
try { // try {
const base64String = await convertFileToBase64(filesToSend[i]); // const base64String = await convertFileToBase64(filesToSend[i]);
return base64String; // return base64String;
} catch (error) { // } catch (error) {
return false; // return false;
} // }
}; };
// if(await !fileToBase64()){ // if(await !fileToBase64()){
@@ -2,7 +2,7 @@ import React, { useEffect, useState } from 'react'
import LoadingSpinner from '../Spinners/LoadingSpinner' import LoadingSpinner from '../Spinners/LoadingSpinner'
export default function InfiniteScroll({ export default function InfiniteScroll({
allData=data, allData=[],
addItemBy=12, addItemBy=12,
intialItemsToShow=39, intialItemsToShow=39,
children children
+4 -2
View File
@@ -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>
+3
View File
@@ -1,5 +1,6 @@
import React, { useState, useEffect } from "react"; import React, { useState, useEffect } from "react";
import MyTasks from "../components/MyTasks"; import MyTasks from "../components/MyTasks";
import {useLocation} from 'react-router-dom'
// import UsersService from "../services/UsersService"; // import UsersService from "../services/UsersService";
import usersService from "../services/UsersService"; import usersService from "../services/UsersService";
@@ -7,6 +8,8 @@ import { useSelector } from "react-redux";
import RecentlyPastDue from "../components/MyTasks/RecentlyPastDue"; import RecentlyPastDue from "../components/MyTasks/RecentlyPastDue";
export default function MyTaskPage() { export default function MyTaskPage() {
const location = useLocation()
const api = new usersService(); const api = new usersService();
const queryParams = new URLSearchParams(location?.search); const queryParams = new URLSearchParams(location?.search);
const tab = queryParams.get("tab")?.toLowerCase(); const tab = queryParams.get("tab")?.toLowerCase();
+1 -1
View File
@@ -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})
} }