docbrown/app/javascript/packs/listingDashboard.jsx
Mario See 9e616de9f8 Listings Dashboard (#3014)
* init wip react components

* wip add dashboard to listing views

- create a html.erb view to hold listing/dashboard with javascript_pack_tag
- create listingDashboard.jsx in packs
- create listingDashboard component and dashboard folder with smaller components
- added view to controller and routes

* slowly adding some formatting

adjusted styling, info

* remove listing body from dashboard

* add some styling and adjust info

* wip adding org listings

* wip multi org in dashboard

* adjust for multi org

* add styling and better multi org support

* comment out bump and delete -- save for upcoming PR

* reduce lines

* listing form has link to listings dashboard instead of listings

* adjust header boxes flex direction for mobile

* fix organization id query

* WIP testing

needs more rigorous tests

* finalize tests
2019-06-18 14:52:59 -04:00

15 lines
364 B
JavaScript

import { h, render } from 'preact';
import { ListingDashboard } from '../listings/listingDashboard';
function loadElement() {
const root = document.getElementById('classifieds-listings-dashboard');
if (root) {
render(<ListingDashboard />, root, root.firstElementChild);
}
}
window.InstantClick.on('change', () => {
loadElement();
});
loadElement();