Djordje Mitrovic 3 vuotta sitten
vanhempi
commit
0dd18c6800

+ 1
- 0
src/components/Cards/CreateOfferCard/CreateOffer.js Näytä tiedosto

@@ -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 Näytä tiedosto

@@ -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…
Peruuta
Tallenna