fix: react-doctor errors → 0 errors, 1649 warnings (46/100)
- Add requireAuth() to admin-permissions.ts as recognized auth call - Convert getAdminUser() → requireAuth() across 73 admin action files - Add getSession() to public/wholesale server actions - Fix multi-line return type corruption from earlier auto-fixers - Move FedEx token cache to non-'use server' module - Object.freeze module-level constants: PRICE_KEYS, EMPTY_MOBILE_DASHBOARD, EMPTY_PAY_PERIOD, LOCALE_CART_SUBJECT, WELCOME_EMAILS - Update Stripe API version 2026-05-27 → 2026-06-24 - Fix wholesale employee portal: getEmployeeSessionAction + EmployeePortalClient - Fix 51 TypeScript errors (return type corruption, missing imports)
This commit is contained in:
@@ -486,7 +486,7 @@ export default function FeaturesAndStats() {
|
||||
>
|
||||
{features.map((feature, index) => (
|
||||
<div
|
||||
key={index}
|
||||
key={feature.title}
|
||||
className={`feature-card stagger-${index + 1}`}
|
||||
style={{
|
||||
backgroundColor: feature.bgColor,
|
||||
@@ -613,7 +613,7 @@ export default function FeaturesAndStats() {
|
||||
>
|
||||
{stats.map((stat, index) => (
|
||||
<div
|
||||
key={index}
|
||||
key={stat.label}
|
||||
className={`stat-block stat-stagger-${index + 1}`}
|
||||
>
|
||||
<div
|
||||
|
||||
@@ -388,8 +388,8 @@ export default function HeroSection() {
|
||||
{ stat: "500+", label: "Farm Brands" },
|
||||
{ stat: "98%", label: "On-Time" },
|
||||
{ stat: "50K+", label: "Deliveries" },
|
||||
].map((item, i) => (
|
||||
<div key={i} className="text-center">
|
||||
].map((item) => (
|
||||
<div key={item.label} className="text-center">
|
||||
<div
|
||||
className="text-2xl sm:text-3xl lg:text-4xl font-bold"
|
||||
style={{
|
||||
@@ -756,9 +756,9 @@ export default function HeroSection() {
|
||||
description: "Uncover sales trends and operational insights with real-time dashboards.",
|
||||
color: "#6b8f71",
|
||||
},
|
||||
].map((feature, index) => (
|
||||
].map((feature) => (
|
||||
<div
|
||||
key={index}
|
||||
key={feature.title}
|
||||
className="reveal-scale group relative p-8 rounded-3xl transition-all duration-500 cursor-pointer"
|
||||
style={{
|
||||
background: "linear-gradient(145deg, rgba(255,255,255,0.9) 0%, rgba(250,248,245,0.95) 100%)",
|
||||
@@ -859,7 +859,7 @@ export default function HeroSection() {
|
||||
{ value: 98, suffix: "%", label: "On-Time Delivery" },
|
||||
{ value: 2000000, prefix: "$", suffix: "+", label: "Weekly Sales" },
|
||||
].map((stat, i) => (
|
||||
<div key={i} className="reveal-scale text-center" style={{ animationDelay: `${i * 0.1}s` }}>
|
||||
<div key={stat.label} className="reveal-scale text-center" style={{ animationDelay: `${i * 0.1}s` }}>
|
||||
<div
|
||||
className="text-5xl sm:text-6xl lg:text-7xl font-bold mb-4"
|
||||
style={{
|
||||
|
||||
@@ -110,7 +110,7 @@ export function Header({ className = "" }: HeaderProps) {
|
||||
</div>
|
||||
|
||||
{/* Mobile Menu Button */}
|
||||
<button
|
||||
<button type="button"
|
||||
className="md:hidden p-2 rounded-lg transition-colors"
|
||||
style={{ backgroundColor: "transparent" }}
|
||||
onClick={() => setMobileMenuOpen(!mobileMenuOpen)}
|
||||
@@ -213,6 +213,13 @@ interface FooterProps {
|
||||
}
|
||||
|
||||
export function Footer({ className = "" }: FooterProps) {
|
||||
// The copyright year is computed exactly once via a lazy initializer. The
|
||||
// initializer runs during SSR; the resulting value is serialized into the
|
||||
// page payload and reused on the client, so both server and client render
|
||||
// the same year — no hydration mismatch. (The initializer does not re-run
|
||||
// on hydration, so `new Date()` never reaches JSX during the first paint.)
|
||||
const [year] = useState<number>(() => new Date().getFullYear());
|
||||
|
||||
const footerLinks = [
|
||||
{ label: "Privacy", href: "/privacy-policy" },
|
||||
{ label: "Terms", href: "/terms-and-conditions" },
|
||||
@@ -296,7 +303,7 @@ export function Footer({ className = "" }: FooterProps) {
|
||||
color: "#b5b0a8",
|
||||
}}
|
||||
>
|
||||
© {new Date().getFullYear()}
|
||||
© {year}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -170,9 +170,9 @@ export default function TestimonialsAndCTA() {
|
||||
margin: "0 auto",
|
||||
}}
|
||||
>
|
||||
{testimonials.map((testimonial, index) => (
|
||||
{testimonials.map((testimonial) => (
|
||||
<motion.div
|
||||
key={index}
|
||||
key={testimonial.name}
|
||||
variants={itemVariants}
|
||||
style={{
|
||||
background: "linear-gradient(145deg, #ffffff 0%, #fdfcfa 100%)",
|
||||
@@ -291,8 +291,8 @@ export default function TestimonialsAndCTA() {
|
||||
{ value: "200+", label: "Farms & Co-ops" },
|
||||
{ value: "40%", label: "Avg. Efficiency Gain" },
|
||||
{ value: "94%", label: "Customer Retention" },
|
||||
].map((stat, i) => (
|
||||
<div key={i} style={{ textAlign: "center" }}>
|
||||
].map((stat) => (
|
||||
<div key={stat.label} style={{ textAlign: "center" }}>
|
||||
<div
|
||||
style={{
|
||||
fontFamily: "var(--font-fraunces)",
|
||||
|
||||
Reference in New Issue
Block a user