|
|
|
|
|
|
|
|
|
|
|
|
|
|
const ThirdPartCreateOffer = (props) => { |
|
|
const ThirdPartCreateOffer = (props) => { |
|
|
const { t } = useTranslation(); |
|
|
const { t } = useTranslation(); |
|
|
|
|
|
console.log(props) |
|
|
const offer = useMemo( |
|
|
const offer = useMemo( |
|
|
() => ({ |
|
|
() => ({ |
|
|
offer: { |
|
|
offer: { |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
subcategory: props.informations.subcategory, |
|
|
subcategory: props.informations.subcategory, |
|
|
condition: props.informations.condition, |
|
|
condition: props.informations.condition, |
|
|
_created: new Date().toString(), |
|
|
|
|
|
|
|
|
_created: props?.offer?._created || new Date().toString(), |
|
|
images: props.informations.images.filter( |
|
|
images: props.informations.images.filter( |
|
|
(item) => item !== undefined && item !== null |
|
|
(item) => item !== undefined && item !== null |
|
|
), |
|
|
), |
|
|
|
|
|
|
|
|
handleSubmitOffer: PropTypes.func, |
|
|
handleSubmitOffer: PropTypes.func, |
|
|
informations: PropTypes.object, |
|
|
informations: PropTypes.object, |
|
|
isLoading: PropTypes.bool, |
|
|
isLoading: PropTypes.bool, |
|
|
|
|
|
offer: PropTypes.any, |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
export default ThirdPartCreateOffer; |
|
|
export default ThirdPartCreateOffer; |