From b554a653bad01d56ff92d9f6ea94f06b0e08f232 Mon Sep 17 00:00:00 2001 From: Jonghyeon Ko Date: Mon, 23 Nov 2026 00:58:42 +0900 Subject: [PATCH] Keep homepage layout stable during hydration --- .../home/HomeApplicationStarter.tsx | 22 --- src/components/home/HomeCommunitySection.tsx | 23 +--- src/components/home/HomeSectionFallbacks.tsx | 127 ------------------ .../home/HomeSocialProofSection.tsx | 64 --------- src/routes/index.tsx | 28 +--- 5 files changed, 13 insertions(+), 251 deletions(-) delete mode 100644 src/components/home/HomeSectionFallbacks.tsx diff --git a/src/components/home/HomeApplicationStarter.tsx b/src/components/home/HomeApplicationStarter.tsx index e10eb9a11..3616a1112 100644 --- a/src/components/home/HomeApplicationStarter.tsx +++ b/src/components/home/HomeApplicationStarter.tsx @@ -1,9 +1,6 @@ import * as React from 'react' -import { Hydrate } from '@tanstack/react-start' -import { visible } from '@tanstack/react-start/hydration' import { ApplicationStarter } from '~/components/ApplicationStarter' -import { HomeApplicationStarterFallback } from './HomeSectionFallbacks' const headlineStorageKey = 'tanstack-home-starter-headline-index' const headlines = [ @@ -15,17 +12,6 @@ const headlines = [ ] as const export function HomeApplicationStarter() { - return ( - } - > - - - ) -} - -function RotatingHomeApplicationStarter() { const [headlineIndex, setHeadlineIndex] = React.useState(0) React.useEffect(() => { @@ -45,14 +31,6 @@ function RotatingHomeApplicationStarter() { headlineStorageKey, String((currentIndex + 1) % headlines.length), ) - - const section = document.getElementById('start-with-a-prompt') - if (section?.dataset.focusPrompt === 'true') { - const field = section.querySelector('textarea') - field?.focus() - field?.select() - delete section.dataset.focusPrompt - } }, []) return ( diff --git a/src/components/home/HomeCommunitySection.tsx b/src/components/home/HomeCommunitySection.tsx index d1ae913c0..ecb3cdace 100644 --- a/src/components/home/HomeCommunitySection.tsx +++ b/src/components/home/HomeCommunitySection.tsx @@ -1,7 +1,5 @@ import { lazy, Suspense } from 'react' import { ClientOnly, createLink } from '@tanstack/react-router' -import { Hydrate } from '@tanstack/react-start' -import { visible } from '@tanstack/react-start/hydration' import { ArrowRightIcon } from '@phosphor-icons/react' import { Button } from '~/components/ds/ui' import { allMaintainers } from '~/libraries/maintainers' @@ -14,28 +12,19 @@ const MaintainersMap = lazy(() => })), ) +// Reserve the map, its help text line, and the gap between them. const globeFallback = ( -