Skip to content

Commit

Permalink
Merge pull request #432 from Chaem03/feature/#349
Browse files Browse the repository at this point in the history
🎨 Design: 블러이미지 추가
  • Loading branch information
Chaem03 authored Aug 6, 2024
2 parents a420db9 + 2fb58d8 commit 6a53066
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/pages/Share/Share.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ const SharePage = ({ onBack }) => {
setIsButtonVisible(false);
setTimeout(async () => {
const canvas = await html2canvas(captureRef.current, { useCORS: true });
const ctx = canvas.getContext("2d");
ctx.filter = "blur(10px)";

await captureScreenshot(canvas);
setIsButtonVisible(true);
}, 100);
Expand Down Expand Up @@ -84,11 +83,12 @@ const SharePage = ({ onBack }) => {
alt={starData.name}
onLoad={() => setIsImageReady(true)}
/>
<S.BlurImage className="blur" src={blur} />

<S.BannerTitle>
<div>{starData.name}</div>
<div className="profession">{starData.profession}</div>
</S.BannerTitle>
<S.BlurImage className="blur" src={blur} />
</S.Header>
<div className="Container">
<S.ClearCantainr>
Expand Down
7 changes: 4 additions & 3 deletions src/pages/Share/styled.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@ export const BannerImage = styled.img`

export const BlurImage = styled.img`
position: absolute;
z-index: 2;
bottom: 10px;
z-index: 5;
bottom: 2px;
left: 0;
width: 100%;
height: 90px;
`;
export const BannerTitle = styled.div`
position: absolute;
Expand Down Expand Up @@ -108,7 +109,7 @@ export const ClearMain = styled.div`
font-weight: bold;
text-align: center;
color: white;
font-size: 1.2rem;
font-size: 1.5rem;
transform: translate(-50%, -50%);
}
Expand Down

0 comments on commit 6a53066

Please sign in to comment.