nodebb-plugin-ns-awards-recalbox
Version:
System for rewarding forum users. It allows admin to define set of awards that could be granted to users for special accomplishments.
13 lines (10 loc) • 399 B
JavaScript
import {createSelector} from 'reselect';
import {getAwardForGrant, getGrantReason, getUsersForGrant} from './selectors';
export default function isAwardGrantValid() {
return createSelector(
getAwardForGrant, getGrantReason, getUsersForGrant,
(award, reason, users) => {
return !!reason && reason.length > 0 && award !== null && users.length > 0;
}
);
}