* i dont know how to test * fix i guess * layout update * layout updates * edit * edit listing * fix * tags field * specs| * Update app/javascript/listings/__tests__/ContactViaConnect.test.jsx Co-authored-by: Fernando Valverde <fernando@visualcosita.com> Co-authored-by: Fernando Valverde <fernando@visualcosita.com>
29 lines
623 B
JavaScript
29 lines
623 B
JavaScript
import { h, render } from 'preact';
|
|
import ListingForm from '../listings/listingForm';
|
|
|
|
function loadElement() {
|
|
const root = document.getElementById('listingform-data');
|
|
if (root) {
|
|
const {
|
|
listing,
|
|
organizations,
|
|
categoriesForSelect,
|
|
categoriesForDetails,
|
|
} = root.dataset;
|
|
render(
|
|
<ListingForm
|
|
organizations={organizations}
|
|
listing={listing}
|
|
categoriesForSelect={categoriesForSelect}
|
|
categoriesForDetails={categoriesForDetails}
|
|
/>,
|
|
root,
|
|
);
|
|
}
|
|
}
|
|
|
|
window.InstantClick.on('change', () => {
|
|
loadElement();
|
|
});
|
|
|
|
loadElement();
|