From 52a4a63e5c7ae205ed4d426218c6761e2f229cd8 Mon Sep 17 00:00:00 2001 From: zaidmukaddam Date: Wed, 28 Aug 2024 19:45:03 +0530 Subject: [PATCH] refactor: fixed animation sync in hero section and improved UI --- app/page.tsx | 122 +++++++++++++++++++++++++++++++-------------------- 1 file changed, 74 insertions(+), 48 deletions(-) diff --git a/app/page.tsx b/app/page.tsx index 72ef869..6a69563 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -512,7 +512,7 @@ const MobileNavItem: React.FC<{ href: string; children: React.ReactNode; onClick ) } -const EnhancedLandingPage: React.FC = () => { +const LandingPage: React.FC = () => { const { scrollYProgress } = useScroll() const opacity = useTransform(scrollYProgress, [0, 0.2], [1, 0]) const scale = useTransform(scrollYProgress, [0, 0.2], [1, 0.95]) @@ -556,6 +556,27 @@ const EnhancedLandingPage: React.FC = () => { { icon: Mic, title: "Translation & TTS", description: "Translate text and convert to speech with OpenAI TTS." }, ] + const containerVariants = { + hidden: { opacity: 0, y: 20 }, + visible: { + opacity: 1, + y: 0, + transition: { + duration: 0.5, + when: "beforeChildren", + staggerChildren: 0.1 + } + } + }; + + const itemVariants = { + hidden: { opacity: 0, y: 20 }, + visible: { + opacity: 1, + y: 0, + transition: { duration: 0.5 } + } + }; return (
@@ -626,54 +647,59 @@ const EnhancedLandingPage: React.FC = () => {
-
- - +
+
- -

- Introducing MiniPerplx -

-
- -

- A minimalistic AI search engine designed to deliver answers in the simplest and most elegant way possible.✨ -

-
- - - + + Introducing MiniPerplx + + + A minimalistic AI search engine designed to deliver answers in the simplest and most elegant way possible.✨ + + + + + + + + MiniPerplx - A minimalistic AI-powered search engine. | Product Hunt + + + Peerlist + + +
- -
- - - MiniPerplx - A minimalistic AI-powered search engine. | Product Hunt - - - Peerlist - -
@@ -805,4 +831,4 @@ const EnhancedLandingPage: React.FC = () => { ) } -export default EnhancedLandingPage \ No newline at end of file +export default LandingPage \ No newline at end of file