chore(layout): export Cacheable of some components
parent
30f96a4609
commit
179da121cc
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue