Skip to content

Commit 3031696

Browse files
committed
feat(website): add ChevronDown component for smooth scrolling in LandingSection
1 parent 10b7828 commit 3031696

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
'use client';
2+
3+
import { ChevronDownIcon, LucideProps } from 'lucide-react';
4+
import { FC } from 'react';
5+
6+
export const ChevronDown: FC<LucideProps> = (props) => (
7+
<ChevronDownIcon
8+
{...props}
9+
onClick={() => {
10+
window.scrollTo({
11+
top: window.innerHeight - 100,
12+
behavior: 'smooth',
13+
});
14+
}}
15+
/>
16+
);

apps/website/src/components/LandingPage/LandingSection/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@ import { useIntlayer } from 'next-intlayer/server';
44
import type { FC } from 'react';
55
import { ActionButtons } from './ActionButtons';
66
import { AnimatedDescription } from './AnimatedDescription';
7+
import { ChevronDown } from './ChevronDown';
78

89
export const LandingSection: FC = () => {
910
const { title, description, keyPoints } = useIntlayer('landing-section');
1011

1112
return (
12-
<section className="flex min-h-[calc(100vh-64px)] w-full flex-col gap-16 md:flex-row md:px-10 md:pr-0">
13+
<section className="relative flex min-h-[calc(100vh-64px)] w-full flex-col gap-16 md:flex-row md:px-10 md:pr-0">
1314
<div className="relative flex w-full flex-1 flex-col items-center justify-between md:justify-center">
1415
<div className="flex w-full md:flex-auto md:items-center">
1516
<div className="relative z-10 flex flex-col md:w-3/5">
@@ -51,6 +52,7 @@ export const LandingSection: FC = () => {
5152
</div>
5253
<ActionButtons className="z-10 mb-5 p-8 pt-0 md:hidden" />
5354
</div>
55+
<ChevronDown className="absolute z-10 max-md:hidden text-neutral bottom-10 left-1/2 -translate-x-1/2 size-10 hover:cursor-pointer hover:translate-y-1 animate-bounce animate-infinite animate-duration-1000 animate-ease-linear" />
5456
</section>
5557
);
5658
};

0 commit comments

Comments
 (0)