This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/widgets/category-link.js.es6
Robin Ward 04990e7c5c PERF: Use widgets to render categories in hamburger menu
Small change results in 1.3x faster on initial render, 1.7x
on subsequent renders.
2016-03-03 13:45:38 -05:00

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);
}
};