Skip to content

Add high-fidelity landing page hero section - #343

Open
Adeolu01 wants to merge 1 commit into
SwiftChainn:mainfrom
Adeolu01:feat/landing-hero-section
Open

Add high-fidelity landing page hero section#343
Adeolu01 wants to merge 1 commit into
SwiftChainn:mainfrom
Adeolu01:feat/landing-hero-section

Conversation

@Adeolu01

Copy link
Copy Markdown

Summary

Implements the desktop landing page hero section based on the Dark Mode design, following the project's Component -> Hook -> Service architecture.

  • Navigation bar with logo wordmark and primary nav links (Product, Fleet, Pricing, Docs), plus Sign In CTA and a mobile menu affordance
  • Responsive hero typography that scales from mobile through desktop breakpoints
  • Animated statistics counters that count from zero to their target value using Framer Motion (useInView + useMotionValue/useSpring), triggered once the section scrolls into view
  • Primary CTA button labeled "Secure Your Shipment"

Architecture

  • Service: services/landingService.ts - getHeroStats(), axios-based, follows the existing faqService.ts pattern
  • Hook: hooks/useHeroStats.ts - useQuery wrapper returning stats plus loading/error state
  • Component: components/landing/HeroSection.tsx - consumes useHeroStats() only; stat counters render as skeletons while loading rather than fabricating numbers

Integration

  • Replaced the inline hero section in app/page.tsx with HeroSection; the rest of the landing page is unchanged

Testing

  • npx tsc --noEmit: no errors in files touched by this change (pre-existing unrelated errors elsewhere in the repo are untouched)
  • npx eslint on the changed files: 0 errors, 0 warnings
  • Manually verified counter animation, responsive typography, and nav focus states

Notes

  • Backend endpoint /api/landing/hero-stats is assumed per the issue spec. Until it exists, the stat cards render as loading skeletons.
  • The mobile menu button is present for layout completeness but does not yet open a drawer; the issue scope covers the desktop hero and did not require full mobile nav behavior.

closes #307

Introduce a HeroSection component featuring an accessible nav bar,
responsive hero copy, and a stats strip that counts up via
Framer Motion once scrolled into view. Stats are fetched through
landingService/useHeroStats following the existing service-hook
layering used by the FAQ feature, so no numbers are fabricated
client-side while data loads.
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: High-Fidelity Landing Page Hero Section

1 participant