From 7d9798bdb2bfd3146903ce32513b877b5b737c6c Mon Sep 17 00:00:00 2001 From: mbazhlekova Date: Tue, 21 Sep 2021 12:23:39 -0500 Subject: [PATCH] fix: use module.exports --- src/components/InstallButton.js | 9 +++++---- src/utils/get-pack-nr1-url.js | 6 ++++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/components/InstallButton.js b/src/components/InstallButton.js index 3e190671f..d83847b50 100644 --- a/src/components/InstallButton.js +++ b/src/components/InstallButton.js @@ -2,13 +2,14 @@ import React from 'react'; import PropTypes from 'prop-types'; import { css } from '@emotion/react'; import { Button, Link, Icon } from '@newrelic/gatsby-theme-newrelic'; -import { - getPackNr1Url, - getGuidedInstallStackedNr1Url, -} from '../utils/get-pack-nr1-url'; import { NR1_LOGIN_URL } from '../data/constants'; import { quickstart } from '../types'; +const { + getPackNr1Url, + getGuidedInstallStackedNr1Url, +} = require('../utils/get-pack-nr1-url'); + /** * @param {String} id * @param {String} nerdletId diff --git a/src/utils/get-pack-nr1-url.js b/src/utils/get-pack-nr1-url.js index 53a8b733b..a416c0f7d 100644 --- a/src/utils/get-pack-nr1-url.js +++ b/src/utils/get-pack-nr1-url.js @@ -14,7 +14,7 @@ const NERDLET_PATH = `launcher/nr1-core.explorer/`; * @param {boolean} [debug] If set to true, this will add `packages=local`. * @returns {string} The URL for the pack details within the platform. */ -export const getPackNr1Url = (quickstartId, debug = false) => { +const getPackNr1Url = (quickstartId, debug = false) => { const pane = JSON.stringify({ nerdletId: NR1_PACK_DETAILS_NERDLET, quickstartId, @@ -42,7 +42,7 @@ export const getPackNr1Url = (quickstartId, debug = false) => { * @param {boolean} [debug] If set to true, this will add `packages=local`. * @returns {string} The URL for the pack details within the platform. */ -export const getGuidedInstallStackedNr1Url = (debug = false) => { +const getGuidedInstallStackedNr1Url = (debug = false) => { const pane = JSON.stringify({ nerdletId: NR1_EXPLORER_NERDLET }); const card = JSON.stringify({ nerdletId: NR1_GUIDED_INSTALL_NERDLET }); @@ -66,3 +66,5 @@ export const getGuidedInstallStackedNr1Url = (debug = false) => { return guidedInstallUrl.href; }; + +module.exports = { getPackNr1Url, getGuidedInstallStackedNr1Url };