From 179da121ccd89fab6ad8348ab24bd53505ff7b1c Mon Sep 17 00:00:00 2001 From: ppoffice Date: Sun, 8 Mar 2020 20:32:11 -0400 Subject: [PATCH] chore(layout): export Cacheable of some components --- layout/plugin/animejs.jsx | 4 +++- layout/plugin/back_to_top.jsx | 4 +++- layout/search/insight.jsx | 4 +++- layout/widget/profile.jsx | 4 +++- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/layout/plugin/animejs.jsx b/layout/plugin/animejs.jsx index 4382068..4a41c07 100644 --- a/layout/plugin/animejs.jsx +++ b/layout/plugin/animejs.jsx @@ -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; return { head, jsUrl: helper.url_for('/js/animation.js') }; }); + +module.exports = AnimeJs; diff --git a/layout/plugin/back_to_top.jsx b/layout/plugin/back_to_top.jsx index b750340..a42d1a4 100644 --- a/layout/plugin/back_to_top.jsx +++ b/layout/plugin/back_to_top.jsx @@ -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; if (head) { return null; @@ -25,3 +25,5 @@ module.exports = cacheComponent(BackToTop, 'plugin.backtotop', props => { jsUrl: helper.url_for('/js/back-to-top.js') }; }); + +module.exports = BackToTop; diff --git a/layout/search/insight.jsx b/layout/search/insight.jsx index 4d6ed28..dcbbe8b 100644 --- a/layout/search/insight.jsx +++ b/layout/search/insight.jsx @@ -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; return { @@ -55,3 +55,5 @@ module.exports = cacheComponent(Insight, 'search.insight', props => { cssUrl: helper.url_for('/css/insight.css') }; }); + +module.exports = Insight; diff --git a/layout/widget/profile.jsx b/layout/widget/profile.jsx index 6625feb..abccc36 100644 --- a/layout/widget/profile.jsx +++ b/layout/widget/profile.jsx @@ -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 { avatar, @@ -152,3 +152,5 @@ module.exports = cacheComponent(Profile, 'widget.profile', props => { socialLinks }; }); + +module.exports = Profile;