-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor : 메인페이지 물병 컴포넌트 리팩토링 및 애니메이션 추가
- Loading branch information
1 parent
c9c1290
commit 7eafc26
Showing
6 changed files
with
52 additions
and
114 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,47 @@ | ||
import React from 'react'; | ||
import bottleImg from '../../../public/라벨택_유리병.svg'; | ||
import { Label } from '../Common/BottleLetter/Label/Label'; | ||
import { useNavigate } from 'react-router-dom'; | ||
|
||
interface HomeBottleProps { | ||
letterType: 'LETTER' | 'REPLY_LETTER'; | ||
labelUrl: string; | ||
letterId: number; | ||
} | ||
|
||
export const HomeBottle = ({ | ||
letterType, | ||
labelUrl, | ||
letterId | ||
}: HomeBottleProps) => { | ||
const navigate = useNavigate(); | ||
|
||
const handleClickBottle = () => { | ||
navigate(`letter/keyword/${letterType}/received/${letterId}`); | ||
}; | ||
|
||
export const HomeBottle = () => { | ||
return ( | ||
<div className="flex justify-center h-full"> | ||
<img src="/홈_유리병.svg" className="object-contain" /> | ||
<div className="absolute top-[115px] left-[90px] -rotate-[45deg]"> | ||
{/* 믈결 애니메이션 */} | ||
<div className="absolute h-[300px] w-[300px] rounded-[135px] animate-spin animate-duration-[14000ms] bg-transparent overflow-hidden" /> | ||
<div className="absolute h-[300px] w-[300px] rounded-[135px] animate-spin animate-duration-[12000ms] bg-transparent overflow-hidden" /> | ||
<div className="absolute h-[300px] w-[300px] rounded-[135px] animate-spin animate-duration-[10000ms] bg-transparent overflow-hidden"> | ||
<div className="relative top-[7px] h-[300px] w-[300px] animate-spin animate-duration-[10000ms] animate-reverse"> | ||
<div className="rotate-[40deg] flex justify-center h-[300px]"> | ||
<img | ||
src={bottleImg} | ||
className="object-contain relative top-[35px]" | ||
onClick={handleClickBottle} | ||
/> | ||
<div | ||
className="h-[35%] absolute top-[105px] left-[190px] rotate-[20deg]" | ||
onClick={handleClickBottle} | ||
> | ||
<Label imgSrc={labelUrl} /> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters