Djordje Mitrovic преди 3 години
родител
ревизия
0dd18c6800
променени са 2 файла, в които са добавени 4 реда и са изтрити 1 реда
  1. 1
    0
      src/components/Cards/CreateOfferCard/CreateOffer.js
  2. 3
    1
      src/components/Cards/CreateOfferCard/ThirdPart/ThirdPartCreateOffer.js

+ 1
- 0
src/components/Cards/CreateOfferCard/CreateOffer.js Целия файл

@@ -197,6 +197,7 @@ const CreateOffer = ({ editOffer, offer, isAdmin, customUserId }) => {
{currentStep === 3 && (
<ThirdPartCreateOffer
handleSubmitOffer={handleSubmitOffer}
offer={offer}
informations={informations}
isLoading={isLoading}
/>

+ 3
- 1
src/components/Cards/CreateOfferCard/ThirdPart/ThirdPartCreateOffer.js Целия файл

@@ -8,6 +8,7 @@ import { useMemo } from "react";

const ThirdPartCreateOffer = (props) => {
const { t } = useTranslation();
console.log(props)
const offer = useMemo(
() => ({
offer: {
@@ -16,7 +17,7 @@ const ThirdPartCreateOffer = (props) => {
},
subcategory: props.informations.subcategory,
condition: props.informations.condition,
_created: new Date().toString(),
_created: props?.offer?._created || new Date().toString(),
images: props.informations.images.filter(
(item) => item !== undefined && item !== null
),
@@ -71,6 +72,7 @@ ThirdPartCreateOffer.propTypes = {
handleSubmitOffer: PropTypes.func,
informations: PropTypes.object,
isLoading: PropTypes.bool,
offer: PropTypes.any,
};

export default ThirdPartCreateOffer;

Loading…
Отказ
Запис