Skip to content

Commit

Permalink
fix: use module.exports
Browse files Browse the repository at this point in the history
  • Loading branch information
mbazhlekova committed Sep 21, 2021
1 parent 2a04d89 commit 7d9798b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
9 changes: 5 additions & 4 deletions src/components/InstallButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions src/utils/get-pack-nr1-url.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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 });

Expand All @@ -66,3 +66,5 @@ export const getGuidedInstallStackedNr1Url = (debug = false) => {

return guidedInstallUrl.href;
};

module.exports = { getPackNr1Url, getGuidedInstallStackedNr1Url };

0 comments on commit 7d9798b

Please sign in to comment.