Move every Team.findOne() to the ReactiveCache

This commit is contained in:
Martin Filser 2023-02-04 00:25:46 +01:00
parent 2ab34d3b87
commit fe2015735a
4 changed files with 32 additions and 9 deletions

View file

@ -148,18 +148,18 @@ BlazeComponent.extendComponent({
Template.boardTeamRow.helpers({
teamData() {
return Team.findOne(this.teamId);
return ReactiveCache.getTeam(this.teamId);
},
});
Template.boardTeamName.helpers({
teamName() {
const team = Team.findOne(this.teamId);
const team = ReactiveCache.getTeam(this.teamId);
return team && team.teamDisplayName;
},
teamViewPortWidth() {
const team = Team.findOne(this.teamId);
const team = ReactiveCache.getTeam(this.teamId);
return ((team && team.teamDisplayName.length) || 1) * 12;
},
});