From fb362f65c4ed65fb67cc3341110e525799eb20bf Mon Sep 17 00:00:00 2001 From: Klesti Selimaj Date: Tue, 12 May 2026 04:28:36 +0200 Subject: [PATCH] Fixed scrolling --- src/app/(home)/Home.css | 9 --------- src/app/(home)/layout.tsx | 15 +++++++++++---- src/app/(home)/page.tsx | 24 +++--------------------- 3 files changed, 14 insertions(+), 34 deletions(-) diff --git a/src/app/(home)/Home.css b/src/app/(home)/Home.css index 6dc6217..29e205f 100644 --- a/src/app/(home)/Home.css +++ b/src/app/(home)/Home.css @@ -1,12 +1,3 @@ -/* Force the body to never scroll */ -html, body { - overflow: hidden; - height: 100%; - margin: 0; - padding: 0; -} - -/* Optional: Hide scrollbar track for a cleaner UI while keeping functionality */ .no-scrollbar::-webkit-scrollbar { display: none; } diff --git a/src/app/(home)/layout.tsx b/src/app/(home)/layout.tsx index 77379fa..de2e48a 100644 --- a/src/app/(home)/layout.tsx +++ b/src/app/(home)/layout.tsx @@ -1,6 +1,13 @@ -import { HomeLayout } from 'fumadocs-ui/layouts/home'; -import { baseOptions } from '@/lib/layout.shared'; +import { HomeLayout } from "fumadocs-ui/layouts/home"; +import { baseOptions } from "@/lib/layout.shared"; -export default function Layout({ children }: LayoutProps<'/'>) { - return {children}; +export default function Layout({ children }: LayoutProps<"/">) { + return ( + + {children} + + ); } diff --git a/src/app/(home)/page.tsx b/src/app/(home)/page.tsx index 2d1ec2a..2ab2049 100644 --- a/src/app/(home)/page.tsx +++ b/src/app/(home)/page.tsx @@ -190,37 +190,20 @@ export default function HomePage() { const [currentText, setCurrentText] = useState(mistShowcase[0]?.code || ""); return ( - /* - 1. Move overflow-y-auto and snap-y to the ROOT div. - Now the entire screen is the scrollable "track". - */ -
- {/* - THE RIGHT SIDE (MorphCode) - Using 'sticky' instead of 'fixed'. It will stay pinned to the - top/center while you scroll through the sections. - */} -
-
+
+
+
- {/* - We use a key here to help React/Framer distinguish - morphing vs unmounting if needed - */}
- {/* - THE SECTIONS - They now live in the main scroll flow. - */}
{mistShowcase.map((show) => ( - {/* Scroll Indicator - Use fixed so it stays relative to screen */}