From 215bbbea0e04e2ce840390fc787e277b9914c33b Mon Sep 17 00:00:00 2001 From: Nick Date: Mon, 10 Feb 2025 14:59:24 +0000 Subject: [PATCH] Use environment variables --- src/components/JsonSchemaValidator/index.js | 6 +++--- src/components/MarkdownTableAsMui/index.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/JsonSchemaValidator/index.js b/src/components/JsonSchemaValidator/index.js index 479548b438..40bb37203e 100644 --- a/src/components/JsonSchemaValidator/index.js +++ b/src/components/JsonSchemaValidator/index.js @@ -12,9 +12,9 @@ import ReactMarkdown from 'react-markdown'; import { DataGridPremium, GridToolbar, useGridApiRef, useKeepGroupedColumnsHidden, gridClasses, } from '@mui/x-data-grid-premium'; import { LicenseInfo } from '@mui/x-license-pro'; -LicenseInfo.setLicenseKey("a3d6a1e3cdca760ace01b65d01608642Tz03MTE1NixFPTE3MjE1NDQ2NzEwMDAsUz1wcmVtaXVtLExNPXN1YnNjcmlwdGlvbixLVj0y"); +LicenseInfo.setLicenseKey(process.env.PUBLIC_MUI_LICENSE_KEY); -// Import all the schemas +// Import all the schemas function importAll(r) { const mods = {} r.keys().forEach(element => { @@ -169,7 +169,7 @@ export function JsonToTable({ children, versionedSchema }) { filterable: true },].concat(columns) - // generate the rows of data from the properties + // generate the rows of data from the properties const rows = Object.keys(properties).map((list, index) => ( { id: index, variableName: list.substring(10), longDescription: properties[list].longDescription, default: properties[list].packageDefault, group: properties[list].group, warehouse: properties[list].warehouse } )) diff --git a/src/components/MarkdownTableAsMui/index.js b/src/components/MarkdownTableAsMui/index.js index 23cff6ba17..73a4076076 100644 --- a/src/components/MarkdownTableAsMui/index.js +++ b/src/components/MarkdownTableAsMui/index.js @@ -2,7 +2,7 @@ import React from 'react'; import { DataGridPremium } from '@mui/x-data-grid-premium'; import { LicenseInfo } from '@mui/x-license-pro'; -LicenseInfo.setLicenseKey("a3d6a1e3cdca760ace01b65d01608642Tz03MTE1NixFPTE3MjE1NDQ2NzEwMDAsUz1wcmVtaXVtLExNPXN1YnNjcmlwdGlvbixLVj0y"); +LicenseInfo.setLicenseKey(process.env.PUBLIC_MUI_LICENSE_KEY); const MarkdownTableToMuiDataGrid = (markdownTable, datagridProps = {}) => { // Split the markdown table into rows