fix(donate): rename donate to donates in config
parent
aded066b91
commit
4b1728e696
|
@ -47,6 +47,11 @@ module.exports = class extends Migration {
|
|||
}
|
||||
}
|
||||
|
||||
if (Array.isArray(result.donate) && result.donate.length) {
|
||||
result.donates = result.donate;
|
||||
delete result.donate;
|
||||
}
|
||||
|
||||
if (Array.isArray(result.widgets) && result.widgets.length) {
|
||||
for (const widget of result.widgets) {
|
||||
if (Object.prototype.hasOwnProperty.call(widget, 'type')) {
|
||||
|
|
|
@ -5,15 +5,15 @@ module.exports = class extends Component {
|
|||
render() {
|
||||
const { config, helper } = this.props;
|
||||
const { __ } = helper;
|
||||
const { donate = [] } = config;
|
||||
if (!Array.isArray(donate) || !donate.length) {
|
||||
const { donates = [] } = config;
|
||||
if (!Array.isArray(donates) || !donates.length) {
|
||||
return null;
|
||||
}
|
||||
return <div class="card">
|
||||
<div class="card-content">
|
||||
<h3 class="menu-label has-text-centered">{__('donate.title')}</h3>
|
||||
<div class="buttons is-centered">
|
||||
{donate.map(service => {
|
||||
{donates.map(service => {
|
||||
const type = service.type;
|
||||
if (typeof type === 'string') {
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue