04990e7c5c
Small change results in 1.3x faster on initial render, 1.7x on subsequent renders.
11 lines
338 B
JavaScript
11 lines
338 B
JavaScript
import RawHtml from 'discourse/widgets/raw-html';
|
|
import { categoryBadgeHTML } from 'discourse/helpers/category-link';
|
|
|
|
// Right now it's RawHTML. Eventually it should emit nodes
|
|
export default class CategoryLink extends RawHtml {
|
|
constructor(attrs) {
|
|
attrs.html = categoryBadgeHTML(attrs.category, attrs);
|
|
super(attrs);
|
|
}
|
|
};
|