diff options
Diffstat (limited to 'app/assets/javascripts/clusters/components/gcp_signup_offer.js')
-rw-r--r-- | app/assets/javascripts/clusters/components/gcp_signup_offer.js | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/app/assets/javascripts/clusters/components/gcp_signup_offer.js b/app/assets/javascripts/clusters/components/gcp_signup_offer.js deleted file mode 100644 index 8bc20a1c09f..00000000000 --- a/app/assets/javascripts/clusters/components/gcp_signup_offer.js +++ /dev/null @@ -1,27 +0,0 @@ -import $ from 'jquery'; -import axios from '~/lib/utils/axios_utils'; -import { __ } from '~/locale'; -import Flash from '~/flash'; - -export default function gcpSignupOffer() { - const alertEl = document.querySelector('.gcp-signup-offer'); - if (!alertEl) { - return; - } - - const closeButtonEl = alertEl.getElementsByClassName('close')[0]; - const { dismissEndpoint, featureId } = closeButtonEl.dataset; - - closeButtonEl.addEventListener('click', () => { - axios - .post(dismissEndpoint, { - feature_name: featureId, - }) - .then(() => { - $(alertEl).alert('close'); - }) - .catch(() => { - Flash(__('An error occurred while dismissing the alert. Refresh the page and try again.')); - }); - }); -} |