diff --git a/src/components/FamilyAcc/Tabs/FamilyWaitlist.jsx b/src/components/FamilyAcc/Tabs/FamilyWaitlist.jsx
index e146ba2..996654c 100644
--- a/src/components/FamilyAcc/Tabs/FamilyWaitlist.jsx
+++ b/src/components/FamilyAcc/Tabs/FamilyWaitlist.jsx
@@ -1,148 +1,152 @@
-import { useState, useMemo, memo } from "react";
-import { handlePagingFunc, PaginatedList } from "../../Pagination";
-import LoadingSpinner from "../../Spinners/LoadingSpinner";
+import { memo, useMemo, useState } from "react";
import SuggestTask from "../../FamilyPopup/SuggestTask";
+import { PaginatedList, handlePagingFunc } from "../../Pagination";
+import LoadingSpinner from "../../Spinners/LoadingSpinner";
import AssignTaskPopout from "../FamilyPopout/AssignTaskPopout";
-const FamilyWaitlist = memo(({ familyData, className, accountDetails, loader }) => {
- const [popUp, setPopUp] = useState({ show: false, data: {} });
- const [continueTaskPopup, setContinueTaskPopup] = useState({
- show: false,
- data: {},
- });
- const filteredFamilyData = useMemo(
- () =>
- familyData?.result_list?.filter(
- (data) => data?.family_uid === accountDetails?.family_uid
- ),
- [familyData, accountDetails]
- );
+const FamilyWaitlist = memo(
+ ({ familyData, className, accountDetails, loader }) => {
+ const [popUp, setPopUp] = useState({ show: false, data: {} });
+ const [continueTaskPopup, setContinueTaskPopup] = useState({
+ show: false,
+ data: {},
+ });
+ const filteredFamilyData = useMemo(
+ () =>
+ familyData?.result_list?.filter(
+ (data) => data?.family_uid === accountDetails?.family_uid
+ ),
+ [familyData, accountDetails]
+ );
- const [currentPage, setCurrentPage] = useState(0);
- const itemsPerPage = Number(process.env.REACT_APP_ITEM_PER_PAGE);
- const indexOfFirstItem = currentPage;
- const indexOfLastItem = currentPage + itemsPerPage;
- const currentTask = useMemo(
- () => filteredFamilyData?.slice(indexOfFirstItem, indexOfLastItem),
- [filteredFamilyData, indexOfFirstItem, indexOfLastItem]
- );
+ const [currentPage, setCurrentPage] = useState(0);
+ const itemsPerPage = Number(process.env.REACT_APP_ITEM_PER_PAGE);
+ const indexOfFirstItem = currentPage;
+ const indexOfLastItem = currentPage + itemsPerPage;
+ const currentTask = useMemo(
+ () => filteredFamilyData?.slice(indexOfFirstItem, indexOfLastItem),
+ [filteredFamilyData, indexOfFirstItem, indexOfLastItem]
+ );
- const handlePagination = (e) => handlePagingFunc(e, setCurrentPage);
+ const handlePagination = (e) => handlePagingFunc(e, setCurrentPage);
- const openPopUp = (value) => {
- setPopUp({ show: true, data: { ...value } });
- };
+ const openPopUp = (value) => {
+ setPopUp({ show: true, data: { ...value } });
+ };
- const closePopUp = () => {
- setPopUp({ show: false, data: {} });
- };
+ const closePopUp = () => {
+ setPopUp({ show: false, data: {} });
+ };
- const openContinueTaskPopup = (value) => {
- setContinueTaskPopup({ show: true, data: { ...value } });
- };
+ const openContinueTaskPopup = (value) => {
+ setContinueTaskPopup({ show: true, data: { ...value } });
+ };
- const closeContinueTaskPopup = () => {
- setContinueTaskPopup({ show: false, data: {} });
- };
+ const closeContinueTaskPopup = () => {
+ setContinueTaskPopup({ show: false, data: {} });
+ };
- return (
-
- {loader ? (
-
-
-
- ) : (
- <>
- {filteredFamilyData && (
-
-
-
- {currentTask.map((value) => {
- const addedDate = value?.added.split(" ")[0];
- const selectedImage = require(`../../../assets/images/family/${
- value?.banner || "default.jpg"
- }`);
- return (
-
-
-
-
-
- 
+ return (
+
+ {loader ? (
+
+
+
+ ) : (
+ <>
+ {filteredFamilyData && (
+
+
+
+ {currentTask.map((value) => {
+ const addedDate = value?.added.split(" ")[0];
+ const selectedImage = require(`../../../assets/images/family/${
+ value?.banner || "default.jpg"
+ }`);
+ return (
+
+
+
+
+
+ 
+
+
+
+ {value.title}
+
+
+ {value.description}
+
+
-
-
- {value.title}
+
+
+ {addedDate}
-
- {value.description}
+
+ {value.status_text}
-
-
- {addedDate}
-
-
- {value.status_text}
-
-
-
- |
-
-
- |
-
- );
- })}
-
-
- = filteredFamilyData?.length}
- data={filteredFamilyData}
- start={indexOfFirstItem}
- stop={indexOfLastItem}
- />
-
- )}
- >
- )}
- {popUp.show && (
-
- )}
+ |
+
+
+ |
+
+ );
+ })}
+
+
+
= filteredFamilyData?.length
+ }
+ data={filteredFamilyData}
+ start={indexOfFirstItem}
+ stop={indexOfLastItem}
+ />
+
+ )}
+ >
+ )}
+ {popUp.show && (
+
+ )}
- {continueTaskPopup.show && (
-
- )}
-
- );
-});
+ {continueTaskPopup.show && (
+
+ )}
+
+ );
+ }
+);
export default FamilyWaitlist;
diff --git a/src/components/MyWallet/AddFundDollars.jsx b/src/components/MyWallet/AddFundDollars.jsx
index b463d8a..9033972 100644
--- a/src/components/MyWallet/AddFundDollars.jsx
+++ b/src/components/MyWallet/AddFundDollars.jsx
@@ -59,6 +59,7 @@ function AddFundDollars(props) {
let apiCall = new usersService();
let [tab, setTab] = useState("previous"); //STATE FOR SWITCHING BETWEEN TABS
+ const [loader, setLoader] = useState(false);
let [prevCardDetails, setPrevCardDetails] = useState(null); // STATE TO HOLD PREVIOUS CARD SELECTED
@@ -94,18 +95,26 @@ function AddFundDollars(props) {
}, 5000);
}
if (tab == "previous") {
- const stateData = { amount: Number(props.input), currency: "dollars" };
- navigate("confirm-add-fund", { state: stateData }); // State will change later dummy for now
+ setLoader(true);
+ const stateData = {
+ amount: Number(props.input),
+ currency: props.currency,
+ };
+
+ setTimeout(() => {
+ props.setConfirmCredit({ show: true, data: stateData });
+ setLoader(false);
+ }, 1500);
+ // navigate("confirm-add-fund", { state: stateData }); // State will change later dummy for now
}
if (tab == "new") {
const stateData = {
amount: Number(props.input),
- currency: "dollars",
+ currency: props.currency,
...values,
};
- navigate("confirm-add-fund", { state: stateData }); // State will change later dummy for now
+ // navigate("confirm-add-fund", { state: stateData }); // State will change later dummy for now
}
- props.setInput("");
};
useEffect(() => {
@@ -169,7 +178,11 @@ function AddFundDollars(props) {