chore(layout): export Cacheable of some components

This commit is contained in:
ppoffice 2020-03-08 20:32:11 -04:00
parent 30f96a4609
commit 179da121cc
4 changed files with 12 additions and 4 deletions

View File

@ -11,10 +11,12 @@ class AnimeJs extends Component {
} }
} }
module.exports = cacheComponent(AnimeJs, 'plugin.animejs', props => { AnimeJs.Cacheable = cacheComponent(AnimeJs, 'plugin.animejs', props => {
const { helper, head } = props; const { helper, head } = props;
return { return {
head, head,
jsUrl: helper.url_for('/js/animation.js') jsUrl: helper.url_for('/js/animation.js')
}; };
}); });
module.exports = AnimeJs;

View File

@ -15,7 +15,7 @@ class BackToTop extends Component {
} }
} }
module.exports = cacheComponent(BackToTop, 'plugin.backtotop', props => { BackToTop.Cacheable = cacheComponent(BackToTop, 'plugin.backtotop', props => {
const { helper, head } = props; const { helper, head } = props;
if (head) { if (head) {
return null; return null;
@ -25,3 +25,5 @@ module.exports = cacheComponent(BackToTop, 'plugin.backtotop', props => {
jsUrl: helper.url_for('/js/back-to-top.js') jsUrl: helper.url_for('/js/back-to-top.js')
}; };
}); });
module.exports = BackToTop;

View File

@ -38,7 +38,7 @@ class Insight extends Component {
} }
} }
module.exports = cacheComponent(Insight, 'search.insight', props => { Insight.Cacheable = cacheComponent(Insight, 'search.insight', props => {
const { helper } = props; const { helper } = props;
return { return {
@ -55,3 +55,5 @@ module.exports = cacheComponent(Insight, 'search.insight', props => {
cssUrl: helper.url_for('/css/insight.css') cssUrl: helper.url_for('/css/insight.css')
}; };
}); });
module.exports = Insight;

View File

@ -81,7 +81,7 @@ class Profile extends Component {
} }
} }
module.exports = cacheComponent(Profile, 'widget.profile', props => { Profile.Cacheable = cacheComponent(Profile, 'widget.profile', props => {
const { site, helper, widget } = props; const { site, helper, widget } = props;
const { const {
avatar, avatar,
@ -152,3 +152,5 @@ module.exports = cacheComponent(Profile, 'widget.profile', props => {
socialLinks socialLinks
}; };
}); });
module.exports = Profile;