Skip to content

Commit

Permalink
Refactor: svgr 라이브러리 적용으로 인한 코드 변경이 안된 부분 마저 변경.
Browse files Browse the repository at this point in the history
  • Loading branch information
seoyeon committed Apr 13, 2024
1 parent 9b6c194 commit 81c111d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
5 changes: 3 additions & 2 deletions modal/addLinkModal/AddLinkModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { DATA } from "@/constants/folderList_mock_data";
import { ModalBaseProps } from "@/types/type";
import IconCheck from "@/public/images/Icon_check.svg";
import styles from "./AddLinkModal.module.css";
import Image from "next/image";

function AddLinkModal({ isOpenModal, closeModal }: ModalBaseProps) {
const [clickItem, setClickItem] = useState('');
Expand Down Expand Up @@ -40,7 +39,9 @@ function AddLinkModal({ isOpenModal, closeModal }: ModalBaseProps) {
</span>
<span className={styles.linkCount}>{item.linkCount}개 링크</span>
</div>
{clickItem === item.folderName && <Image src={IconCheck} width={14} height={14} alt="Icon-check" />}
{clickItem === item.folderName &&
<IconCheck />
}
</button>
</>
)
Expand Down
9 changes: 3 additions & 6 deletions modal/shareModal/ShareModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ import { useScript } from "@/utils/hooks/useScript";
import { useEffect, useState } from "react";
import { FacebookShareButton } from "react-share";
import ModalLayout from "@/modal/ModalLayout";
import IconKakao from "@/public/images/Icon_Kakao.svg";
import IconFacebook from "@/public/images/Icon_Facebook.svg";
import IconLink from "@/public/images/Icon_link.svg";
import styles from "./ShareModal.module.css";
import Image from "next/image";

Expand Down Expand Up @@ -58,14 +55,14 @@ function ShareModal({ isOpenModal, closeModal }: ModalBaseProps) {
className={styles.shareKakao}
type="button"
onClick={handleKakaoButton}>
<Image src={IconKakao} alt={IconKakao} />
<Image src='/images/Icon_Kakao.svg' width={18} height={18} alt='IconKakao' />
</button>
<p className={styles.linkButtonName}>카카오톡</p>
</div>
<FacebookShareButton url={currentUrl}>
<div className={styles.shareButton}>
<button className={styles.shareFacebook} type="button">
<Image src={IconFacebook} alt={IconFacebook} />
<Image src='/images/Icon_Facebook.svg' width={18} height={18} alt='IconFacebook' />
</button>
<p className={styles.linkButtonName}>페이스북</p>
</div>
Expand All @@ -75,7 +72,7 @@ function ShareModal({ isOpenModal, closeModal }: ModalBaseProps) {
className={styles.copyLink}
type="button"
onClick={() => handleCopyClipBoard(currentUrl)}>
<Image src={IconLink} alt={IconLink} />
<Image src='/images/Icon_link.svg' width={18} height={18} alt='IconLink' />
</button>
<p className={styles.linkButtonName}>링크 복사</p>
</div>
Expand Down

0 comments on commit 81c111d

Please sign in to comment.