diff --git a/apps/docs/app/(home)/page.client.tsx b/apps/docs/app/(home)/page.client.tsx index c84b2bac5..3a255df9c 100644 --- a/apps/docs/app/(home)/page.client.tsx +++ b/apps/docs/app/(home)/page.client.tsx @@ -15,7 +15,7 @@ import scrollIntoView from 'scroll-into-view-if-needed'; import { cn } from '@/utils/cn'; import { buttonVariants } from '@/components/ui/button'; -export function CreateAppAnimation(): React.ReactElement { +export function CreateAppAnimation() { const installCmd = 'npm create fumadocs-app'; const tickTime = 100; const timeCommandEnter = installCmd.length; @@ -129,7 +129,7 @@ export function WhyInteractive(props: { codeblockInteractive: ReactNode; typeTable: ReactNode; codeblockMdx: ReactNode; -}): ReactNode { +}) { const [autoActive, setAutoActive] = useState(true); const [active, setActive] = useState(0); const duration = 1000 * 8; @@ -153,19 +153,6 @@ export function WhyInteractive(props: { }; }, [active, autoActive, duration, items.length]); - if (typeof window !== 'undefined') { - const element = document.getElementById( - `why-interactive-${active.toString()}`, - ); - - if (element) { - scrollIntoView(element, { - behavior: 'smooth', - boundary: document.getElementById('why-interactive'), - }); - } - } - return (
(