2018-03-25 18:03:08 +00:00
|
|
|
// License: LGPL-3.0-or-later
|
2018-03-25 17:30:42 +00:00
|
|
|
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')})
|
|
|
|
}
|
|
|
|
|