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