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:
@@ -33,6 +33,11 @@ export const viewport: Viewport = {
|
||||
maximumScale: 5,
|
||||
};
|
||||
|
||||
// Module-level constant for the copyright year. Evaluated once per
|
||||
// server render (module scope), so the footer string is a static value
|
||||
// — avoids hydration mismatch from `new Date()` in JSX.
|
||||
const CURRENT_YEAR = new Date().getFullYear();
|
||||
|
||||
const SECURITY_FEATURES = [
|
||||
{
|
||||
title: "Bank-Level Encryption",
|
||||
@@ -97,8 +102,8 @@ export default function SecurityPage() {
|
||||
<section className="py-12 bg-white border-b border-[#e5e5e5]">
|
||||
<div className="max-w-6xl mx-auto px-6">
|
||||
<div className="flex flex-wrap justify-center gap-6">
|
||||
{TRUST_BADGES.map((badge, i) => (
|
||||
<div key={i} className="flex items-center gap-2 px-5 py-3 bg-[#faf8f5] rounded-full border border-[#e5e5e5]">
|
||||
{TRUST_BADGES.map((badge) => (
|
||||
<div key={badge.label} className="flex items-center gap-2 px-5 py-3 bg-[#faf8f5] rounded-full border border-[#e5e5e5]">
|
||||
<span className="text-lg">{badge.icon}</span>
|
||||
<span className="text-sm font-medium text-[#1a1a1a]">{badge.label}</span>
|
||||
</div>
|
||||
@@ -126,8 +131,8 @@ export default function SecurityPage() {
|
||||
Enterprise-Grade Security
|
||||
</h2>
|
||||
<div className="grid md:grid-cols-2 lg:grid-cols-3 gap-6">
|
||||
{SECURITY_FEATURES.map((feature, i) => (
|
||||
<div key={i} className="bg-white rounded-2xl p-6 border border-[#e5e5e5] shadow-sm">
|
||||
{SECURITY_FEATURES.map((feature) => (
|
||||
<div key={feature.title} className="bg-white rounded-2xl p-6 border border-[#e5e5e5] shadow-sm">
|
||||
<div className="w-12 h-12 bg-[#faf8f5] rounded-xl flex items-center justify-center text-2xl mb-4">
|
||||
{feature.icon}
|
||||
</div>
|
||||
@@ -257,7 +262,7 @@ export default function SecurityPage() {
|
||||
{/* Footer */}
|
||||
<footer className="border-t border-[#e5e5e5] py-8 bg-white">
|
||||
<div className="max-w-6xl mx-auto px-6 text-center text-sm text-[#888]">
|
||||
© {new Date().getFullYear()} Route Commerce. All rights reserved.
|
||||
© {CURRENT_YEAR} Route Commerce. All rights reserved.
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user