houdini/client/js/nonprofits/supporters/index/sidepanel/offsite-donation-form.js

34 lines
782 B
JavaScript
Raw Normal View History

// License: LGPL-3.0-or-later
const R = require('ramda')
const h = require('snabbdom/h')
const flyd = require('flyd')
const modal = require('ff-core/modal')
const button = require('ff-core/button')
const format = require('../../../../common/format')
const moment = require('moment')
const request = require('../../../../common/request')
const serialize = require('form-serialize')
2018-10-11 16:35:53 +00:00
const flyd_flatMap = require('flyd/module/flatmap')
const flyd_mergeAll = require('flyd/module/mergeall')
function init(parentState) {
var state = {
submit$: flyd.stream()
, supporter$: parentState.supporter$
2018-10-11 16:35:53 +00:00
, saved$: flyd.stream(Math.random())
}
2018-10-11 16:35:53 +00:00
return state
}
function view(state) {
2018-10-11 16:35:53 +00:00
return h('div', {id$: 'offsite_donation_form_modal'})
}
module.exports = {init, view}