'use strict';
const { Component } = require('inferno');
const { cacheComponent } = require('../util/cache');
class Alipay extends Component {
render() {
const { type, qrcode, __, url_for } = this.props;
if (!qrcode) {
return
You forgot to set the qrcode
for Alipay.
Please set it in _config.yml
.
;
}
return
{__('donate.' + type)}
;
}
}
module.exports = cacheComponent(Alipay, 'donate.alipay', props => {
return {
type: props.type,
qrcode: props.qrcode,
__: props.__,
url_for: props.url_for,
// for cache purpose only
_language: props.page.lang || props.page.language || props.language
};
});