Compare commits

..

4 Commits

5 changed files with 34 additions and 9 deletions
+28 -3
View File
@@ -72,9 +72,21 @@ function AddJob({ popUpHandler, categories }) {
}
};
// For form initial values
const initialValues = {
// initial values for formik
country: walletDetails.data.length == 1 ? walletDetails.data[0].country : '',
price: "",
title: "",
description: "",
job_detail: "",
timeline_days: "",
category: [],
};
return (
<Formik
initialValues={IV}
initialValues={initialValues}
validationSchema={validationSchema}
onSubmit={handleAddJob}
>
@@ -105,12 +117,13 @@ function AddJob({ popUpHandler, categories }) {
className={`input-field p-2 mt-3 rounded-md placeholder:text-base text-dark-gray dark:text-white w-full h-10 bg-slate-100 dark:bg-[#11131F] focus:ring-0 focus:outline-none border`}
onChange={props.handleChange}
onBlur={props.handleBlur}
disabled={walletDetails.data.length == 1}
>
{walletDetails?.loading ? (
<option className="text-slate-500 text-lg" value="">
Loading...
</option>
) : walletDetails.data.length ? (
) : walletDetails.data.length > 1 ? (
<>
<option className="text-slate-500 text-lg" value="">
Select a currency
@@ -125,7 +138,19 @@ function AddJob({ popUpHandler, categories }) {
</option>
))}
</>
) : (
) : walletDetails.data.length == 1 ?
<>
{walletDetails.data?.map((item, index) => (
<option
key={index}
className="text-slate-500 text-lg"
value={item?.country}
>
{item?.description}
</option>
))}
</>
:(
<option className="text-slate-500 text-lg" value="">
No Options Found! Try Again
</option>
+2 -2
View File
@@ -16,7 +16,7 @@ function WalletAction({ walletItem, payment, openPopUp }) {
return (
<div className="counters w-full flex justify-between gap-2">
<div className="w-1/2 flex justify-center items-center">
<div className="w-1/2 flex justify-start items-center">
<button
onClick={() => {
setShowNairaWithdraw((prev) => ({ ...prev, show: true }));
@@ -28,7 +28,7 @@ function WalletAction({ walletItem, payment, openPopUp }) {
Spend
</button>
</div>
<div className="w-1/2 flex justify-center items-center">
<div className="w-1/2 flex justify-end items-center">
<button
className="logout-btn btn-gradient text-white"
onClick={() => {
+1 -1
View File
@@ -22,7 +22,7 @@ export default function WalletBox({ wallet, payment, countries }) {
</div>
) : (
data.length > 0 && data.map((item) => (
<div key={item.wallet_uid} className="lg:w-full h-full mb-10 lg:mb-0">
<div key={item.wallet_uid} className="max-w-[450px] w-full h-full mb-10 lg:mb-0">
<WalletItemCard walletItem={item} payment={payment} countries={countries} />
</div>
))
+2 -2
View File
@@ -44,7 +44,7 @@ export default function WalletItemCard({ walletItem, payment, countries }) {
return (
<>
<div
className="current-balance-widget w-full h-full rounded-2xl overflow-hidden flex flex-col items-center gap-2 p-8 justify-between"
className="current-balance-widget w-full h-full rounded-2xl overflow-hidden flex flex-col items-center gap-4 p-4 justify-between"
style={{
background: `url(${background}) 0% 0% / cover no-repeat`,
}}
@@ -86,7 +86,7 @@ export default function WalletItemCard({ walletItem, payment, countries }) {
</span>
</p>
<div className="my-2 w-full h-[1px] bg-white"></div>
<div className="w-full h-[1px] bg-white"></div>
<WalletAction
walletItem={{ ...walletItem, walletCountry: currentWalletCurrency }}
+1 -1
View File
@@ -183,7 +183,7 @@
@apply px-2 min-w-[80px] h-11 flex justify-center items-center text-base rounded-full cursor-pointer
}
.logout-btn {
@apply px-4 min-w-[80px] h-[52px] flex justify-center items-center text-base rounded-full cursor-pointer
@apply px-4 min-w-[80px] h-[52px] flex justify-center items-center text-xl font-bold rounded-full cursor-pointer
}
}