Welcome to mirror list, hosted at ThFree Co, Russian Federation.

init_count.js « mr_notes « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3e924ebd9d5d51f29d4a0e9182c4c3b64a5ab232 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
import store from '~/mr_notes/stores';

export function initOverviewTabCounter() {
  const discussionsCount = document.querySelector('.js-discussions-count');
  store.watch(
    (state, getters) => getters.discussionTabCounter,
    (val) => {
      if (typeof val !== 'undefined') {
        discussionsCount.textContent = val;
      }
    },
  );
}