@daeryun/dr_components 0.9.40 → 0.9.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -195,7 +195,8 @@ const StepTwo = () => {
195
195
  // API 호출 함수
196
196
  const fetchFieldData = (centerCode) => __awaiter(void 0, void 0, void 0, function* () {
197
197
  try {
198
- const response = yield fetch(`https://mng.daeryunlaw.com/api/app/seo-template/field/list-by-center?center_code=${centerCode}`);
198
+ // 외부 프로젝트의 프록시를 통해 요청
199
+ const response = yield fetch(`http://localhost:3000/api/mng/app/seo-template/field/list-by-center?center_code=${centerCode}`);
199
200
  if (!response.ok) {
200
201
  throw new Error(`API 호출 실패: ${response.status}`);
201
202
  }
@@ -203,7 +204,7 @@ const StepTwo = () => {
203
204
  return data;
204
205
  }
205
206
  catch (error) {
206
- console.error(`API 호출 실패:`, error);
207
+ console.error(`Center code ${centerCode} API 호출 실패:`, error);
207
208
  return { result: false, data: [] };
208
209
  }
209
210
  });
@@ -680,24 +681,6 @@ const StepTwo = () => {
680
681
  </div>
681
682
  </div>
682
683
  )} */}
683
- {centerCodes.map((centerCode, index) => {
684
- var _a, _b;
685
- const currentFieldData = fieldData[centerCode];
686
- const categoryName = (_a = categories.find(item => item.code === centerCode)) === null || _a === void 0 ? void 0 : _a.code_name;
687
- if (!((_b = currentFieldData === null || currentFieldData === void 0 ? void 0 : currentFieldData.data) === null || _b === void 0 ? void 0 : _b.length)) {
688
- return null;
689
- }
690
- return (<div key={centerCode} className="sm:flex sm:flex-row sm:rounded-[16px] sm:border sm:border-solid sm:border-grayScale5 sm:p-[40px] lg:rounded-[20px]">
691
- <p className="body_large1_mo sm:body_large1_tb lg:body_large1 sm:w-[150px] sm:flex-shrink-0">
692
- {categoryName}
693
- </p>
694
- <div className="my-[12px] w-full bg-grayScale5 max-sm:h-[1px] sm:mx-[44px] sm:my-0 sm:h-auto sm:w-[1px] sm:flex-shrink-0 lg:gap-[80px]"/>
695
-
696
- <div className={`flex flex-row flex-wrap gap-x-[8px] gap-y-[12px] sm:gap-[20px] lg:gap-x-[24px] ${index === 1 ? 'lg:gap-y-[32px]' : 'lg:gap-y-[24px]'}`}>
697
- {currentFieldData.data.map(item => (<Box key={item.type_idx} type_idx={item.type_idx} tag_title={item.tag_title} selected={selectedList.includes(item.type_idx)} selectedList={selectedList} setSelectedList={setSelectedList} activeTooltipId={activeTooltipId} setActiveTooltipId={setActiveTooltipId} tooltipTimeoutRef={tooltipTimeoutRef}/>))}
698
- </div>
699
- </div>);
700
- })}
701
684
  </div>
702
685
  <div className="mb-[56px] mt-[40px] flex flex-col items-center justify-center sm:mt-[60px] lg:mt-[79px]">
703
686
  <div className="flex w-full flex-row items-center justify-center gap-[8px]">
@@ -248,8 +248,9 @@ const StepTwo = () => {
248
248
  // API 호출 함수
249
249
  const fetchFieldData = async (centerCode: string) => {
250
250
  try {
251
+ // 외부 프로젝트의 프록시를 통해 요청
251
252
  const response = await fetch(
252
- `https://mng.daeryunlaw.com/api/app/seo-template/field/list-by-center?center_code=${centerCode}`
253
+ `http://localhost:3000/api/mng/app/seo-template/field/list-by-center?center_code=${centerCode}`
253
254
  );
254
255
 
255
256
  if (!response.ok) {
@@ -259,7 +260,7 @@ const StepTwo = () => {
259
260
  const data = await response.json();
260
261
  return data;
261
262
  } catch (error) {
262
- console.error(`API 호출 실패:`, error);
263
+ console.error(`Center code ${centerCode} API 호출 실패:`, error);
263
264
  return { result: false, data: [] };
264
265
  }
265
266
  };
@@ -774,44 +775,6 @@ const StepTwo = () => {
774
775
  </div>
775
776
  </div>
776
777
  )} */}
777
- {centerCodes.map((centerCode, index) => {
778
- const currentFieldData = fieldData[centerCode];
779
- const categoryName = categories.find(item => item.code === centerCode)?.code_name;
780
-
781
- if (!currentFieldData?.data?.length) {
782
- return null;
783
- }
784
-
785
- return (
786
- <div
787
- key={centerCode}
788
- className="sm:flex sm:flex-row sm:rounded-[16px] sm:border sm:border-solid sm:border-grayScale5 sm:p-[40px] lg:rounded-[20px]"
789
- >
790
- <p className="body_large1_mo sm:body_large1_tb lg:body_large1 sm:w-[150px] sm:flex-shrink-0">
791
- {categoryName}
792
- </p>
793
- <div className="my-[12px] w-full bg-grayScale5 max-sm:h-[1px] sm:mx-[44px] sm:my-0 sm:h-auto sm:w-[1px] sm:flex-shrink-0 lg:gap-[80px]" />
794
-
795
- <div
796
- className={`flex flex-row flex-wrap gap-x-[8px] gap-y-[12px] sm:gap-[20px] lg:gap-x-[24px] ${index === 1 ? 'lg:gap-y-[32px]' : 'lg:gap-y-[24px]'}`}
797
- >
798
- {currentFieldData.data.map(item => (
799
- <Box
800
- key={item.type_idx}
801
- type_idx={item.type_idx}
802
- tag_title={item.tag_title}
803
- selected={selectedList.includes(item.type_idx)}
804
- selectedList={selectedList}
805
- setSelectedList={setSelectedList}
806
- activeTooltipId={activeTooltipId}
807
- setActiveTooltipId={setActiveTooltipId}
808
- tooltipTimeoutRef={tooltipTimeoutRef}
809
- />
810
- ))}
811
- </div>
812
- </div>
813
- );
814
- })}
815
778
  </div>
816
779
  <div className="mb-[56px] mt-[40px] flex flex-col items-center justify-center sm:mt-[60px] lg:mt-[79px]">
817
780
  <div className="flex w-full flex-row items-center justify-center gap-[8px]">