Skip to content

Commit

Permalink
Merge pull request #173 from TEAM-FLASH/Feat/#172
Browse files Browse the repository at this point in the history
[S3] 불필요한 코드 제거
  • Loading branch information
aksenmi authored Dec 20, 2024
2 parents 7ec6ff8 + 5b37152 commit 6e54d9e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 17 deletions.
11 changes: 1 addition & 10 deletions src/components/Share/ShareButton.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** @jsxImportSource @emotion/react */
import { css, SerializedStyles } from '@emotion/react';
import { css } from '@emotion/react';
import useBottomSheetState from '@store/useBottomSheetStateStore';
import BottomSheet from '@components/BottomSheet/BottomSheet';
import ShareOptions from '@components/Share/ShareOptions';
Expand Down Expand Up @@ -35,12 +35,3 @@ const containerStyle = css`
width: auto;
height: auto;
`;

/* 사용예시
<ShareButton
title="공유할 스튜디오 이름"
description="공유할 스튜디오 설명"
imageUrl="https://i.imgur.com/BMDwLgQ.jpeg" //보여질 이미지
webUrl="http://toucheese.store/search/results?keyword=그믐달" //이동url
/>
*/
10 changes: 3 additions & 7 deletions src/components/Share/ShareOptions.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/** @jsxImportSource @emotion/react */
import { css } from '@emotion/react';
import KakaoShareButton from '@components/Kakao/KakaoShare';
import KakaoShareButton from '@components/Kakao/KaKaoShare';
import variables from '@styles/Variables';
import { useState } from 'react';
import { createPortal } from 'react-dom';
Expand Down Expand Up @@ -35,12 +35,8 @@ const ShareOptions = ({ title, description, imageUrl, webUrl }: ShareProps) => {
<img src="/img/icon-copy-link.svg" alt="링크 복사" />
</div>
<span css={textStyle}>링크복사</span>
{/* 피드백 메시지를 포털을 통해 바텀시트 외부로 렌더링 */}
{isCopied &&
createPortal(
<div css={feedbackStyle}>Copied! 🎉</div>,
document.body, // 바텀시트 밖에 메시지를 렌더링
)}

{isCopied && createPortal(<div css={feedbackStyle}>Copied! 🎉</div>, document.body)}
</div>
</div>
);
Expand Down

0 comments on commit 6e54d9e

Please sign in to comment.