learnmore bug fixed

This commit is contained in:
victorAnumudu
2025-06-10 17:17:20 +01:00
parent e3399d4b95
commit 4fc109926c
4 changed files with 55 additions and 55 deletions
+7 -7
View File
@@ -39,7 +39,7 @@ function AddJob({ popUpHandler, categories }) {
try {
const res = await ApiCall.jobManagerCreateJob(reqData);
if (res.data.internal_return < 1) {
if (res?.data?.internal_return < 1) {
setRequestStatus({
loading: false,
status: false,
@@ -75,7 +75,7 @@ function AddJob({ popUpHandler, categories }) {
// For form initial values
const initialValues = {
// initial values for formik
country: walletDetails.data.length === 1 ? walletDetails.data[0].country : '',
country: walletDetails?.data?.length === 1 ? walletDetails.data[0].country : '',
price: "",
title: "",
description: "",
@@ -117,18 +117,18 @@ function AddJob({ popUpHandler, categories }) {
className={`input-field p-2 mt-3 rounded-full placeholder:text-base text-dark-gray w-full h-[42px] bg-slate-100 focus:ring-0 focus:outline-none border`}
onChange={props.handleChange}
onBlur={props.handleBlur}
disabled={walletDetails.data.length === 1}
disabled={walletDetails?.data?.length === 1}
>
{walletDetails?.loading ? (
<option className="text-slate-500 text-lg" value="">
Loading...
</option>
) : walletDetails.data.length > 1 ? (
) : walletDetails?.data?.length > 1 ? (
<>
<option className="text-slate-500 text-lg" value="">
Select a currency
</option>
{walletDetails.data?.map((item, index) => (
{walletDetails?.data?.map((item, index) => (
<option
key={index}
className="text-slate-500 text-lg"
@@ -138,9 +138,9 @@ function AddJob({ popUpHandler, categories }) {
</option>
))}
</>
) : walletDetails.data.length === 1 ?
) : walletDetails?.data?.length === 1 ?
<>
{walletDetails.data?.map((item, index) => (
{walletDetails?.data?.map((item, index) => (
<option
key={index}
className="text-slate-500 text-lg"