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

favicon_ci.js « utils « lib « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 613e2620e02a245b75b5079a6dcd520ba531b94b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import axios from './axios_utils';
import { setFaviconOverlay, resetFavicon } from './favicon';

export const setCiStatusFavicon = (pageUrl) =>
  axios
    .get(pageUrl)
    .then(({ data }) => {
      if (data && data.favicon) {
        return setFaviconOverlay(data.favicon);
      }
      return resetFavicon();
    })
    .catch((error) => {
      resetFavicon();
      throw error;
    });