Following script is not showing icon after font awesome 5.0 update.
Please help to make changes in the script.
api.decorateWidget('header-buttons:after', helper => {
if (Discourse.User.current()) {
const createTopic = function() {
const Composer = require('discourse/models/composer').default;
const composerController = Discourse.__container__.lookup('controller:composer');
composerController.open({ action: Composer.CREATE_TOPIC, draftKey: Composer.DRAFT });
}
return helper.h('button#create-new', {
className: "btn fa fa-plus",
title: "Create New Topic",
onclick: createTopic
}, '' ); // ''-this is 'text' for the button, change as needed.
}
});