fix: react-doctor → 64/100 (Bugs 122, Perf 286, A11y 613, Maint 436)

- CartContext: lazy initializers replace mount-only useEffect
  hydration; remove 8 no-initialize-state warnings
- Toast/AdminSearchInput: React 19 useContext/use + drop
  forwardRef (3 no-react19-deprecated-apis)
- ProductFormModal: lazy initializers + useSyncExternalStore
  for mount; parent adds key=editingProduct.id
- InstallPrompt: useReducer for prompt state (no-cascading-set-state)
- QRScanModal: ref-based latest-callback pattern replaces
  useEffectEvent deps mistake
- OnboardingFlow: functional setState (rerender-functional-setstate)
- UsersPage/StopsCalendar/FeaturesAndStats: lazy initializers
  (rerender-lazy-state-init)
- FAQClientPage: server-side brand settings fetch via getBrandSettingsPublic
  in layout; remove supabase import
- LandingPageWrapper: href='#' → href='#top' (anchor-is-valid)
- TuxedoVideoHero: replace animate-bounce with ease-out-expo
  (no-inline-bounce-easing)
- ProductTableClient: useCallback for handleDeleted
  (jsx-no-new-function-as-prop)
- excel-parser: pre-compile delimiter regexes (js-hoist-regexp)
- water-log/settings: Promise.all for parallel DB calls
  (async-parallel)
- ToastNotification: extract toast store to separate file
  (only-export-components)
- WholesaleClient: inline <WholesaleIcon/> instead of hoisting to
  const (rendering-hoist-jsx)
This commit is contained in:
Nora
2026-06-26 02:41:56 -06:00
parent 8e011da521
commit 29d9d23a26
88 changed files with 1399 additions and 1015 deletions
+12 -17
View File
@@ -171,7 +171,7 @@ const stats: Stat[] = [
export default function FeaturesAndStats() {
const [countersStarted, setCountersStarted] = useState(false);
const [counters, setCounters] = useState(stats.map(() => 0));
const [counters, setCounters] = useState<number[]>(() => stats.map(() => 0));
const statsRef = useRef<HTMLDivElement>(null);
useEffect(() => {
@@ -237,12 +237,7 @@ export default function FeaturesAndStats() {
minHeight: "100vh",
}}
>
<style jsx>{`
:global(body) {
margin: 0;
padding: 0;
}
<style dangerouslySetInnerHTML={{ __html: `
.section-label {
font-family: var(--font-manrope);
font-size: 0.75rem;
@@ -278,7 +273,7 @@ export default function FeaturesAndStats() {
cursor: default;
opacity: 0;
transform: translateY(24px);
animation: fadeInUp 0.6s ease forwards;
animation: fa-fade-in-up 0.6s ease forwards;
}
.feature-card:hover {
@@ -320,7 +315,7 @@ export default function FeaturesAndStats() {
text-align: center;
opacity: 0;
transform: translateY(20px);
animation: fadeInUp 0.5s ease forwards;
animation: fa-fade-in-up 0.5s ease forwards;
}
.stat-number {
@@ -363,14 +358,14 @@ export default function FeaturesAndStats() {
margin: 0;
}
@keyframes fadeInUp {
@keyframes fa-fade-in-up {
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes slideInLeft {
@keyframes fa-slide-in-left {
from {
opacity: 0;
transform: translateX(-24px);
@@ -381,7 +376,7 @@ export default function FeaturesAndStats() {
}
}
@keyframes slideInRight {
@keyframes fa-slide-in-right {
from {
opacity: 0;
transform: translateX(24px);
@@ -392,7 +387,7 @@ export default function FeaturesAndStats() {
}
}
@keyframes scaleIn {
@keyframes fa-scale-in {
from {
opacity: 0;
transform: scale(0.9);
@@ -404,15 +399,15 @@ export default function FeaturesAndStats() {
}
.animate-left {
animation: slideInLeft 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
animation: fa-slide-in-left 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.animate-right {
animation: slideInRight 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
animation: fa-slide-in-right 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.animate-scale {
animation: scaleIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
animation: fa-scale-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.stagger-1 { animation-delay: 0.1s; }
@@ -426,7 +421,7 @@ export default function FeaturesAndStats() {
.stat-stagger-2 { animation-delay: 0.3s; }
.stat-stagger-3 { animation-delay: 0.45s; }
.stat-stagger-4 { animation-delay: 0.6s; }
`}</style>
`}} />
{/* ─── FEATURES SECTION ─── */}
<section