Skip to content

feat: add skeleton loaders for history and result pages for issue #11#29

Open
AkshuBalkitta wants to merge 1 commit into
Pushkarini579:mainfrom
AkshuBalkitta:main
Open

feat: add skeleton loaders for history and result pages for issue #11#29
AkshuBalkitta wants to merge 1 commit into
Pushkarini579:mainfrom
AkshuBalkitta:main

Conversation

@AkshuBalkitta

@AkshuBalkitta AkshuBalkitta commented Jun 2, 2026

Copy link
Copy Markdown

Closes #11

Problem

Users experienced a "pop-in" effect when navigating to the history and result pages — the page would flash a plain text message before rendering the actual content.

Solution

Created a reusable Skeleton component and implemented skeleton loaders that mirror the real page layouts, so the user sees a structured placeholder instantly instead of a blank flash.

Changes

New file- src/components/ui/Skeleton.tsx

  • reusable skeleton loaders using Tailwind CSS

src/app/history/page.tsx

  • Replaced "Syncing with Clinical Database..." text with HistoryTableSkeleton
  • Skeleton mirrors the real history table with matching cell shapes

src/app/result/page.tsx

  • Replaced plain "Loading analysis results..." text with ResultSkeleton
  • Skeleton mirrors the full page layout
  • Fixed hydration mismatch by moving sessionStorage read to useEffect hook

Why the useEffect fix:

The original code read sessionStorage inside a useState that lead the server and client to render different HTML on first render— server rendered null (skeleton) while client rendered the full page — triggering a React hydration mismatch error. Moving the read to useEffect ensures both server and client start with null and render the same skeleton, then swap to real content afterwards.

Screenshots

res1_retina res2_retina

@vercel

vercel Bot commented Jun 2, 2026

Copy link
Copy Markdown

@AkshuBalkitta is attempting to deploy a commit to the Pushkarini 's projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Frontend] Implement Loading Skeleton States

1 participant