Skip to content
Merged
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
5,192 changes: 2,314 additions & 2,878 deletions .pnp.cjs

Large diffs are not rendered by default.

Binary file not shown.
Binary file modified .yarn/install-state.gz
Binary file not shown.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"react-error-boundary": "^4.0.13",
"react-router-dom": "^6.26.2",
"storybook": "^8.3.5",
"swiper": "^11.1.15",
"tailwind-merge": "^2.5.4",
"tailwindcss": "^3.4.13",
"vite-plugin-svgr": "^4.2.0"
Expand Down
Binary file added public/landing/current.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/landing/extract.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/landing/maker.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/landing/makers.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/landing/youtube.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions src/constants/swiperOptions.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { Pagination, Navigation, Autoplay } from 'swiper/modules';

export const swiperOptions = {
modules: [Pagination, Navigation, Autoplay],
spaceBetween: 10,
slidesPerView: 1,
pagination: {
clickable: true,
type: 'bullets' as const,
},
autoplay: {
delay: 3000,
},
style: {
'--swiper-pagination-color': '#FF6265',
} as React.CSSProperties,
loop: true,
};
43 changes: 43 additions & 0 deletions src/pages/Landing.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
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 LANDING_IMAGES = ['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">
{LANDING_IMAGES.map((item, index) => (
<SwiperSlide key={index} className="flex justify-center items-center ">
<img
src={`/landing/${item}.png`}
alt={`${item} 이미지`}
loading="lazy"
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>
Comment on lines +35 to +39
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

버튼의 위치 지정 방식을 개선해주세요.

현재 absolute 포지셔닝을 사용하고 있는데, 이는 다양한 화면 크기에서 문제를 일으킬 수 있습니다. Flexbox를 활용한 레이아웃으로 변경하는 것이 좋겠습니다.

- <div className="absolute bottom-3 w-full max-w-[30rem] px-4 mb-5">
+ <div className="w-full max-w-[30rem] px-4 mb-5 mt-auto">

Committable suggestion skipped: line range outside the PR's diff.

</div>
</>
);
};
2 changes: 2 additions & 0 deletions src/routes/route.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { createBrowserRouter } from 'react-router-dom';

import { App } from '@/App';
import { Landing } from '@/pages/Landing';
import { Link } from '@/pages/Link';
import { MapView } from '@/pages/MapView';

Expand All @@ -9,6 +10,7 @@ export const router = createBrowserRouter([
path: '/',
element: <App />,
children: [
{ index: true, element: <Landing /> },
{ path: 'map', element: <MapView /> },
{ path: 'link', element: <Link /> },
],
Expand Down
8 changes: 8 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5954,6 +5954,7 @@ __metadata:
react-router-dom: "npm:^6.26.2"
storybook: "npm:^8.3.5"
storybook-addon-sass-postcss: "npm:^0.3.2"
swiper: "npm:^11.1.15"
tailwind-merge: "npm:^2.5.4"
tailwindcss: "npm:^3.4.13"
ts-jest: "npm:^29.2.5"
Expand Down Expand Up @@ -10301,6 +10302,13 @@ __metadata:
languageName: node
linkType: hard

"swiper@npm:^11.1.15":
version: 11.1.15
resolution: "swiper@npm:11.1.15"
checksum: 10c0/3faabc5b33c0663513e8e41c4ef7920d4c9a1ca6b988848f2e51e1db0d01471a1bae22fce3177b9d3ab2c128fc6df23074415ae7957bd0f8542fd7387fa5263d
languageName: node
linkType: hard

"symbol-tree@npm:^3.2.4":
version: 3.2.4
resolution: "symbol-tree@npm:3.2.4"
Expand Down
Loading