ソースを参照

팝업 디자인 수정 1차

jh-linux 2 ヶ月 前
コミット
958f3b0b87
2 ファイル変更10 行追加24 行削除
  1. 6 16
      src/components/common/PopupModal.tsx
  2. 4 8
      src/pages/Main.tsx

+ 6 - 16
src/components/common/PopupModal.tsx

@@ -3,20 +3,16 @@ import {Link} from "react-router-dom";
 
 interface PopupModalProps {
   imageSrc: string;
-  button1Text: string;
-  button1Link: string;
-  button2Text: string;
-  button2Link: string;
+  buttonText: string;
+  buttonLink: string;
   popupKey: string;
   offsetRightPx?: number;
 }
 
 const PopupModal: React.FC<PopupModalProps> = ({
                                                  imageSrc,
-                                                 button1Text,
-                                                 button1Link,
-                                                 button2Text,
-                                                 button2Link,
+                                                 buttonText,
+                                                 buttonLink,
                                                  popupKey,
                                                  offsetRightPx = 24,
                                                }) => {
@@ -62,16 +58,10 @@ const PopupModal: React.FC<PopupModalProps> = ({
       {/* 버튼 영역 */}
       <div className="flex gap-2 mb-4">
         <Link
-          to={button1Link}
+          to={buttonLink}
           className="flex-1 bg-blue-600 text-white px-3 py-2 rounded text-sm hover:bg-blue-700"
         >
-          {button1Text}
-        </Link>
-        <Link
-          to={button2Link}
-          className="flex-1 bg-green-600 text-white px-3 py-2 rounded text-sm hover:bg-green-700"
-        >
-          {button2Text}
+          {buttonText}
         </Link>
       </div>
 

+ 4 - 8
src/pages/Main.tsx

@@ -15,20 +15,16 @@ const Main = () => {
     <>
       <PopupModal
         imageSrc="/image/popup/popup1.jpg"
-        button1Text="자세히 보기"
-        button1Link="/business/sections"
-        button2Text="전국 문의"
-        button2Link="/business/sections"
+        buttonText="자세히 보기"
+        buttonLink="/maintenance/performance"
         popupKey="popup_hidden_1"
         offsetRightPx={24} // right-6
       />
 
       <PopupModal
         imageSrc="/image/popup/popup2.jpg"
-        button1Text="자세히 보기"
-        button1Link="/business/sections"
-        button2Text="견적 문의하기"
-        button2Link="/business/sections"
+        buttonText="자세히 보기"
+        buttonLink="/maintenance/performance"
         popupKey="popup_hidden_2"
         offsetRightPx={360} // right-90px (popup1 width + margin)
       />