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,17 @@ export const viewport: Viewport = {
|
||||
maximumScale: 5,
|
||||
};
|
||||
|
||||
// Module-level constants for the "Last updated" date and the copyright
|
||||
// year. Evaluated once per server render (module scope), so both
|
||||
// strings are static values — avoids hydration mismatch from `new Date()`
|
||||
// reached from JSX.
|
||||
const LAST_UPDATED = new Date().toLocaleDateString("en-US", {
|
||||
year: "numeric",
|
||||
month: "long",
|
||||
day: "numeric",
|
||||
});
|
||||
const CURRENT_YEAR = new Date().getFullYear();
|
||||
|
||||
export default function TermsPage() {
|
||||
return (
|
||||
<div className="min-h-screen bg-white">
|
||||
@@ -64,7 +75,7 @@ export default function TermsPage() {
|
||||
<div className="mb-12">
|
||||
<p className="text-sm font-bold tracking-[0.15em] uppercase text-[#1a4d2e] mb-3">Legal</p>
|
||||
<h1 className="text-4xl sm:text-5xl font-black text-[#0a0a0a] tracking-tight mb-4">Terms & Conditions</h1>
|
||||
<p className="text-sm text-[#888]">Last updated: {new Date().toLocaleDateString("en-US", { year: "numeric", month: "long", day: "numeric" })}</p>
|
||||
<p className="text-sm text-[#888]">Last updated: {LAST_UPDATED}</p>
|
||||
</div>
|
||||
|
||||
<div className="prose prose-stone max-w-none">
|
||||
@@ -128,7 +139,7 @@ export default function TermsPage() {
|
||||
<path strokeLinecap="round" strokeLinejoin="round" d="M13 10V3L4 14h7v7l9-11h-7z" />
|
||||
</svg>
|
||||
</div>
|
||||
<span className="text-sm text-[#666]">© {new Date().getFullYear()} Route Commerce. All rights reserved.</span>
|
||||
<span className="text-sm text-[#666]">© {CURRENT_YEAR} Route Commerce. All rights reserved.</span>
|
||||
</div>
|
||||
<div className="flex items-center gap-6 text-sm text-[#888]">
|
||||
<Link href="/privacy-policy" className="hover:text-[#1a4d2e] transition-colors">Privacy</Link>
|
||||
|
||||
Reference in New Issue
Block a user