Digits Fixed and SignOut text variable #333

Merged
ameye merged 6 commits from my_wallet_layout into master 2023-07-17 15:07:58 +00:00
5 changed files with 46 additions and 34 deletions
+5 -2
View File
@@ -6,6 +6,7 @@ import { handlePagingFunc } from "../Pagination/HandlePagination";
import PaginatedList from "../Pagination/PaginatedList";
import familyImage from '../../assets/images/no-family-side.png'
import localImgLoad from "../../lib/localImgLoad";
export default function FamilyTable({ className, familyList, loader, popUpHandler }) {
const navigate = useNavigate();
@@ -54,6 +55,7 @@ export default function FamilyTable({ className, familyList, loader, popUpHandle
last_login,
task_count,
family_uid,
banner
} = props;
let addedDate = added?.split(" ")[0];
let LoginDate = last_login?.split(" ")[0];
@@ -64,9 +66,10 @@ export default function FamilyTable({ className, familyList, loader, popUpHandle
>
<td className=" py-4">
<div className="flex space-x-2 items-center w-full">
<div className="w-full h-[60px] rounded-full overflow-hidden flex justify-center items-center flex-[0.1] min-w-[60px]">
<div className="w-[60px] h-[60px] rounded-full overflow-hidden flex justify-center items-center flex-[0.1]">
<img
src={dataImage1}
// src={dataImage1}
src={localImgLoad(`images/icons/${banner}`)}
alt="data"
className="w-full h-full"
/>
@@ -23,7 +23,7 @@ function ConfirmNairaWithdraw({ payment, wallet, action, situation, state }) {
const handleSubmit = () => {
setRequestStatus({ message: "", loading: true, status: false });
let reqData = {
amount: Number(state.amount),
amount: Number(state.amount * 100),
Fee: Number(state.fee),
recipientid: Number(state.recipientID),
};
@@ -58,14 +58,6 @@ function ConfirmNairaWithdraw({ payment, wallet, action, situation, state }) {
});
};
useEffect(() => {
// what happens if not state redirect user
if (!state) {
navigate("/my-wallet/withdraw-naira", { replace: true });
} else {
setPageLoading(false);
}
}, []);
return (
<ModalCom action={action} situation={situation}>
<div className="content-wrapper w-[90%] md:w-[600px]">
@@ -114,7 +106,7 @@ function ConfirmNairaWithdraw({ payment, wallet, action, situation, state }) {
label="Processing Fee:"
type="text"
name="processingFee"
value={state?.fee || ""}
value={(state?.fee * 0.01).toFixed(2) || ""}
disable={true}
/>
</div>
@@ -126,7 +118,7 @@ function ConfirmNairaWithdraw({ payment, wallet, action, situation, state }) {
label="Total"
type="text"
name="total"
value={state?.total || ""}
value={(state?.total * 0.01).toFixed(2) || ""}
disable={true}
/>
</div>
@@ -28,24 +28,23 @@ const initialValues = {
function NairaWithdraw({ wallet, action, situation, setShowConfirmNairaWithdraw }) {
const apiCall = new usersService(); // API CLASS CALL
console.log('TESTING', wallet)
const navigate = useNavigate();
let [requestStatus, setRequestStatus] = useState(false);
let [recipients, setRecipients] = useState({
// FOR COUPON HISTORY
loading: true,
data: [],
error: false,
});
let [sendMoneyFee, setSendMoneyFee] = useState({
loading: false,
fee: 0,
total: 0,
}); // HOLD THE VALUE FOR SEND MONEY FEE
}); // HOLD THE VALUE FOR walletSEND MONEY FEE
//FUNCTION TO GET RECIPIENT LIST
const getRecipients = () => {
apiCall
@@ -76,7 +75,7 @@ console.log('TESTING', wallet)
return;
}
apiCall
.getSendMoneyFee(Number(amount))
.getSendMoneyFee(Number(amount * 100))
.then((res) => {
setSendMoneyFee({
loading: false,
@@ -88,7 +87,7 @@ console.log('TESTING', wallet)
setSendMoneyFee({ loading: false, fee: 0, total: 0 });
});
};
console.log('TESTING', sendMoneyFee)
//FUNCTION TO HANDLE SUBMIT
const handleSubmit = (values, helpers) => {
if (!values?.amount && !values.recipientID) return;
@@ -170,7 +169,7 @@ console.log('TESTING', wallet)
name="fee"
direction="rtl"
value={
sendMoneyFee.loading ? "loading" : sendMoneyFee.fee
sendMoneyFee.loading ? "loading" : (sendMoneyFee.fee * 0.01).toFixed(2)
}
disable={true}
/>
@@ -187,7 +186,7 @@ console.log('TESTING', wallet)
name="total"
direction="rtl"
value={
sendMoneyFee.loading ? "loading" : sendMoneyFee.total
sendMoneyFee.loading ? "loading" : (sendMoneyFee.total * 0.01).toFixed(2)
}
disable={true}
/>
+2 -2
View File
@@ -65,7 +65,8 @@ export default function Resources(props) {
if(name == 'blog'){
return blogItems?.blogdata?.length
}else if(name == 'onsale'){
return onSaleProducts?.length
// return onSaleProducts?.length
return null
}else if(name == 'owned'){
return ownProducts?.length
}else if(name == 'created'){
@@ -95,7 +96,6 @@ export default function Resources(props) {
: "text-thin-light-gray bg-[#F2B8FD]"
}`}
>
{/* 16 blog, onsale, owned,created */}
{countNumber(tabValue.name)}
</span>
</li>
+27 -9
View File
@@ -1,26 +1,44 @@
import ProductCardStyleTwo from "../../Cards/ProductCardStyleTwo";
import DataIteration from "../../Helpers/DataIteration";
import SearchCom from "../../Helpers/SearchCom";
import localImgLoad from "../../../lib/localImgLoad";
export default function QuestionsTab({ className, products }) {
return (
<>
<div className={`onsale-tab-wrapper w-full ${className || ""}`}>
<div className="main-container w-full">
<div className="filter-section w-full items-center sm:flex justify-between mb-6">
{/* filter-search */}
<div className="sm:w-1/2 w-full sm:pr-20 pr-0 mb-5 sm:mb-0">
<SearchCom />
<div className="filter-section w-fullmb-6">
<h1 className="text-xl lg:text-2xl font-bold text-dark-gray dark:text-white tracking-wide">Ask our A.I</h1>
<div className="mt-2 lg:grid grid-cols-2 gap-2 h-full lg:h-[500px]">
<div className="h-full mb-5 lg:mb-0">
<img className="w-full h-full" src={localImgLoad(`images/resources-ask.jpg`)} alt='AI' />
</div>
<div className="p-8 bg-white rounded-2xl h-full">
<div className="input-wrapper border border-[#f5f8fa] dark:border-[#5e6278] w-full rounded-full h-[42px] overflow-hidden relative font-medium leading-6 bg-clip-padding text-[#5e6278] dark:text-gray-100 bg-[#f5f8fa] dark:bg-[#5e6278] text-base">
<select className="input-field px-2 placeholder:text-base text-dark-gray w-full h-full tracking-wide dark:bg-[#11131F] bg-[#fafafa] focus:ring-0 focus:outline-none">
<option className="rounded-full">Find answer on:</option>
</select>
</div>
{/* filter-search */}
<div className="w-full my-5 border-2 rounded-full">
<SearchCom />
</div>
<div className="w-full flex justify-end items-center border-b-2 pb-4">
<button
className="btn-gradient text-base tracking-wide px-4 py-2 rounded-full text-white cursor-pointer"
>
Search
</button>
</div>
</div>
</div>
</div>
<div className="content-section w-full-width">
{/* <div className="content-section w-full-width">
<div className="grid lg:grid-cols-3 sm:grid-cols-2 grid-cols-1 gap-[30px]">
</div>
</div>
</div> */}
</div>
</div>
</>