auto selecting currency if user has only one wallet

This commit was merged in pull request #687.
This commit is contained in:
victorAnumudu
2024-04-01 16:20:58 +01:00
parent f032ed21b5
commit 4b7c3beb53
5 changed files with 152 additions and 42 deletions
@@ -26,6 +26,9 @@ const AssignTaskPopout = ({
}) => {
const {parentAssignJobToKid} = SocketValues()
const { walletDetails } = useSelector((state) => state?.walletDetails); // WALLET STORE
const apiCall = new usersService();
let { pathname, state } = useLocation();
@@ -86,7 +89,7 @@ const AssignTaskPopout = ({
const [formState, setFormState] = useState({
// Initialize form state with desired fields
banner: details?.banner || "default.jpg",
country: details?.country || "",
country: details?.country ? details?.country : walletDetails.data.length == 1 ? walletDetails.data[0].country : '',
price: details?.price || "",
title: details?.title || "",
description: details?.description || "",