Fix map bug

This commit is contained in:
koalasat
2025-07-28 12:41:31 +02:00
parent 761c9a90d8
commit 33eede00ba
2 changed files with 7 additions and 7 deletions

View File

@ -17,8 +17,8 @@ import Map from '../Map';
interface Props {
open: boolean;
orderType: number;
latitude?: number;
longitude?: number;
latitude?: number | null;
longitude?: number | null;
onClose?: (position?: [number, number]) => void;
interactive?: boolean;
zoom?: number;

View File

@ -176,12 +176,12 @@ const MakerForm = ({
const handlePaymentMethodChange = function (paymentArray: string[]): void {
let str = '';
const arrayLength = paymentArray.length;
let includeCoordinates = false;
let includesCash = false;
for (let i = 0; i < arrayLength; i++) {
str += paymentArray[i] + ' ';
if (paymentArray[i] === 'cash') {
includeCoordinates = true;
if (paymentArray[i].includes('F2F')) {
includesCash = true;
if (i === arrayLength - 1) {
setOpenWorldmap(true);
}
@ -195,8 +195,8 @@ const MakerForm = ({
paymentMethods: paymentArray,
paymentMethodsText: paymentMethodText,
badPaymentMethod: paymentMethodText.length > 50,
latitude: includeCoordinates ? maker.latitude : null,
longitude: includeCoordinates ? maker.longitude : null,
latitude: includesCash ? maker.latitude : null,
longitude: includesCash ? maker.longitude : null,
};
});
};