Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor : 메인페이지 물병 컴포넌트 #472

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 0 additions & 51 deletions public/홈_유리병.svg

This file was deleted.

2 changes: 1 addition & 1 deletion src/components/Common/WaveContainer/WaveContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export const WaveContainer = () => {
return (
<div className="z-0">
<img src="/무인도.svg" className="absolute -top-10 right-20" />
<div className="bg-[url('/물결.svg')] absolute h-full w-full overflow-auto bg-cover bg-center custom-mask" />
<div className="animate-shake animate-infinite animate-duration-[5000ms] animate-ease-linear bg-[url('/물결.svg')] absolute h-full w-full overflow-auto bg-cover bg-center custom-mask" />
</div>
);
};
44 changes: 41 additions & 3 deletions src/components/HomePage/HomeBottle.tsx
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>
);
};
46 changes: 0 additions & 46 deletions src/components/HomePage/HomeBottleLetter.tsx

This file was deleted.

Loading
Loading