Merge branch 'my_wallet_layout' of WrenchBoard/Users-Wrench into master

This commit is contained in:
2023-07-12 16:19:58 +00:00
committed by Gogs
2 changed files with 25 additions and 27 deletions
+2 -22
View File
@@ -144,7 +144,7 @@ function AddFundDollars(props) {
<> <>
<div className="w-full"> <div className="w-full">
{/* switch button */} {/* switch button */}
<div className="flex justify-between"> <div className="flex">
<form className="add-fund-info flex items-center gap-3"> <form className="add-fund-info flex items-center gap-3">
<h1 className="text-xl font-bold text-dark-gray dark:text-white tracking-tighter my-1"> <h1 className="text-xl font-bold text-dark-gray dark:text-white tracking-tighter my-1">
{props.currency == "US Dollars" && "Payment Method"} {props.currency == "US Dollars" && "Payment Method"}
@@ -184,26 +184,6 @@ function AddFundDollars(props) {
</label> </label>
</div> </div>
</form> </form>
<form className="add-fund-info flex items-center gap-3">
<h1 className="text-xl font-bold text-dark-gray dark:text-white tracking-tighter my-1">
{props.currency == "US Dollars"
? "Amount (USD)"
: "Amount (Naira)"}
</h1>
<div className="field w-full max-w-[8rem]">
<InputCom
fieldClass="px-6"
type="text"
name="amount"
placeholder="0"
value={props.input}
inputHandler={props.handleChange}
/>
<p className="text-base text-red-500 h-5">
{props.inputError && props.inputError}
</p>
</div>
</form>
</div> </div>
<hr /> <hr />
{/* END OF switch button */} {/* END OF switch button */}
@@ -215,7 +195,7 @@ function AddFundDollars(props) {
<LoadingSpinner size="10" color="sky-blue" /> <LoadingSpinner size="10" color="sky-blue" />
) : payListCards?.data?.length ? ( ) : payListCards?.data?.length ? (
<select <select
className="my-3 w-full rounded-full p-4 outline-none border-none" className="my-3 w-full rounded-full p-4 outline-none border-none text-base text-black dark:text-gray-100 bg-[#dce2e6] dark:bg-[#5e6278] border"
value={prevCardDetails["payment-card"]?.card_uid} value={prevCardDetails["payment-card"]?.card_uid}
id="payment-card" id="payment-card"
name="payment-card" name="payment-card"
+23 -5
View File
@@ -20,7 +20,7 @@ function AddFundPop({ _payment, input, setInput, onClose, setConfirmCredit }) {
//FUNCTION TO HANDLE SUBMIT //FUNCTION TO HANDLE SUBMIT
const handleSubmit = (e) => { const handleSubmit = (e) => {
e.preventDefault() e.preventDefault();
setInputError(""); setInputError("");
if (!input || input == "0") { if (!input || input == "0") {
setInputError("Please Enter Amount"); setInputError("Please Enter Amount");
@@ -36,7 +36,7 @@ function AddFundPop({ _payment, input, setInput, onClose, setConfirmCredit }) {
}, 5000); }, 5000);
} }
if(input) return; if (input) return;
// setTimeout( // setTimeout(
// () => // () =>
// setConfirmCredit({ // setConfirmCredit({
@@ -53,22 +53,40 @@ function AddFundPop({ _payment, input, setInput, onClose, setConfirmCredit }) {
}; };
return ( return (
<div className="h-[32rem] w-full"> <div className="h-[33rem] w-full">
<div className="content-wrapper w-full lg:flex xl:space-x-8 lg:space-x-4 bottomMargin"> <div className="content-wrapper w-full lg:flex xl:space-x-8 lg:space-x-4 bottomMargin">
<div className="lg:w-2/2 w-full mb-10 lg:mb-0"> <div className="lg:w-2/2 w-full mb-10 lg:mb-0">
<div className="add-fund w-full bg-white dark:bg-dark-white rounded-2xl"> <div className="add-fund w-full bg-white dark:bg-dark-white rounded-2xl">
{/*<h2 className='md:p-8 p-4 text-slate-900 dark:text-white text-xl lg:text-2xl font-medium'>Add Credit with Account Deposit</h2>*/} {/*<h2 className='md:p-8 p-4 text-slate-900 dark:text-white text-xl lg:text-2xl font-medium'>Add Credit with Account Deposit</h2>*/}
{/*<hr />*/} {/*<hr />*/}
<form className="md:px-8 md:pt-4 px-4 pt-2 add-fund-info flex items-center gap-[2.1rem]">
<h1 className="text-xl font-bold text-dark-gray dark:text-white tracking-tighter my-1">
{currency == "US Dollars" ? "Amount (USD)" : "Amount (Naira)"}
</h1>
<div className="field w-full max-w-[250px]">
<InputCom
fieldClass="px-6"
type="text"
name="amount"
placeholder="0"
value={input}
inputHandler={handleChange}
/>
<p className="text-base text-red-500 h-5">
{inputError && inputError}
</p>
</div>
</form>
{/* SHOWS THIS IF USER CURRENCY IS DOLLARS */} {/* SHOWS THIS IF USER CURRENCY IS DOLLARS */}
{currency == "US Dollars" && ( {currency == "US Dollars" && (
<div className="w-full md:p-8 p-4 bg-white dark:bg-dark-white rounded-2xl"> <div className="w-full md:px-8 md:pt-4 px-4 pt-2 bg-white dark:bg-dark-white rounded-2xl">
<AddFundDollars <AddFundDollars
setInputError={setInputError} setInputError={setInputError}
input={input} input={input}
setInput={setInput} setInput={setInput}
currency={currency} currency={currency}
onClose={onClose} onClose={onClose}
handleChange={handleChange}
setConfirmCredit={setConfirmCredit} setConfirmCredit={setConfirmCredit}
/> />
</div> </div>