houdini/app/javascript/legacy/components/render-activities.js
2020-04-23 14:09:14 -05:00

18 lines
537 B
JavaScript

// License: LGPL-3.0-or-later
const snabbdom = require('snabbdom')
const render = require('ff-core/render')
const activities = require('./public-activities')
module.exports = (type, path) => {
const init = _ => activities.init(type, path)
const view = state => activities.view(state)
const patch = snabbdom.init([
require('snabbdom/modules/class')
, require('snabbdom/modules/props')
, require('snabbdom/modules/style')
])
render({state: init(), view, patch, container: document.querySelector('#js-activities')})
}