From a0c94e1d019339babf8bd45b1ff192ade47fc6e7 Mon Sep 17 00:00:00 2001
From: joonhoekim <26rote@gmail.com>
Date: Wed, 27 Aug 2025 09:46:36 +0000
Subject: (김준회) 호스트네임에 따른 도메인별 spreadjs 라이선스 적용 처리 및
 운영용 환경변수 주석으로 추가
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 components/form-data/spreadJS-dialog.tsx | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

(limited to 'components/form-data/spreadJS-dialog.tsx')

diff --git a/components/form-data/spreadJS-dialog.tsx b/components/form-data/spreadJS-dialog.tsx
index 14f4d3ea..fbeceaf3 100644
--- a/components/form-data/spreadJS-dialog.tsx
+++ b/components/form-data/spreadJS-dialog.tsx
@@ -12,6 +12,7 @@ import { updateFormDataInDB } from "@/lib/forms/services";
 import { Loader, Save, AlertTriangle } from "lucide-react";
 import '@mescius/spread-sheets/styles/gc.spread.sheets.excel2016colorful.css';
 import { DataTableColumnJSON, ColumnType } from "./form-data-table-columns";
+import { setupSpreadJSLicense } from "@/lib/spread-js/license-utils";
 
 const SpreadSheets = dynamic(
   () => import("@mescius/spread-sheets-react").then(mod => mod.SpreadSheets),
@@ -26,8 +27,9 @@ const SpreadSheets = dynamic(
   }
 );
 
-if (typeof window !== 'undefined' && process.env.NEXT_PUBLIC_SPREAD_LICENSE) {
-  GC.Spread.Sheets.LicenseKey = process.env.NEXT_PUBLIC_SPREAD_LICENSE;
+// 도메인별 라이선스 설정
+if (typeof window !== 'undefined') {
+  setupSpreadJSLicense(GC);
 }
 
 interface TemplateItem {
-- 
cgit v1.2.3

