summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/vue_merge_request_widget/stores/artifacts_list/getters.js
blob: 7740147c8e4598fd9aad404ae9cb581b3282fbdd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
import { s__, n__ } from '~/locale';

export const title = (state) => {
  if (state.isLoading) {
    return s__('BuildArtifacts|Loading artifacts');
  }

  if (state.hasError) {
    return s__('BuildArtifacts|An error occurred while fetching the artifacts');
  }

  return n__('View exposed artifact', 'View %d exposed artifacts', state.artifacts.length);
};