Skip to content

Commit

Permalink
feat: implement Landing page with Swiper and navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
keemsebin committed Dec 9, 2024
1 parent 23b1149 commit 570d0a4
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions src/pages/Landing.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import { useNavigate } from 'react-router-dom';
import { Swiper, SwiperSlide } from 'swiper/react';

import 'swiper/css';
import 'swiper/css/pagination';
import { Button } from '@/components/common/Button';
import { Icon } from '@/components/common/Icon';
import { Body1 } from '@/components/common/Typography';
import { swiperOptions } from '@/constants/swiperOptions';

const img = ['current', 'extract', 'maker', 'makers', 'youtube'];

export const Landing = () => {
const navigate = useNavigate();
return (
<>
<div className="w-full flex flex-col items-center justify-between">
<div className="flex flex-col items-center justify-center gap-5 mt-32">
<Icon name="findyLogo1" className="w-2/3 h-20" />
<Body1>핀디와 함께, 특별한 순간을 찾아보세요</Body1>
</div>
<Swiper {...swiperOptions} className="w-full h-96 max-w-md px-4 my-10 rounded-lg shadow-lg">
{img.map((item, index) => (
<SwiperSlide key={index} className="flex justify-center items-center ">
<img src={`/landing/${item}.png`} className="w-full h-full object-cover" />
</SwiperSlide>
))}
</Swiper>

<div className="absolute bottom-3 w-full max-w-[30rem] px-4 mb-5">
<Button variant="primary" size="large" onClick={() => navigate('/map')}>
시작하기
</Button>
</div>
</div>
</>
);
};

0 comments on commit 570d0a4

Please sign in to comment.