From 3e9c8c05b506036b86948dffb0ade1c9cb1a0fbe Mon Sep 17 00:00:00 2001 From: AdaBebe0 Date: Mon, 31 Aug 2026 20:19:08 -0700 Subject: [PATCH] fix(lint): resolve the 4 ESLint errors blocking CI CI has been red on main for every recent push because `pnpm run lint` exits 1 on 4 errors (the 254 warnings are non-blocking). Nothing after the Lint step has been running as a result. - components/mobile/MobileFooter.tsx: the file was committed with every quote character stripped, so the leading backtick opened a template literal that never closed and the whole file failed to parse. Restored the string quoting; no behaviour change intended. - app/page.tsx: was rendered without being imported (react/jsx-no-undef). Added the missing import. - hooks/useDriverReputation.ts: the effect called setState synchronously (react-hooks/set-state-in-effect). The settled result now carries the driverId it belongs to, so loading is derived rather than written back into state from the effect. - hooks/useTheme.ts: updateTheme was read by an effect declared above it (react-hooks/immutability). Hoisted it into a useCallback keyed on userId and added it to the effect deps. Lint now reports 0 errors. Type-check still fails on 280 pre-existing errors across 44 files, which is out of scope here. --- app/page.tsx | 1 + components/mobile/MobileFooter.tsx | 35 ++++++++++++------------ hooks/useDriverReputation.ts | 43 ++++++++++++++++++------------ hooks/useTheme.ts | 25 +++++++++-------- 4 files changed, 58 insertions(+), 46 deletions(-) diff --git a/app/page.tsx b/app/page.tsx index af2d3e9..8ca3ddb 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -3,6 +3,7 @@ import { ValueProps } from '@/components/landing/ValueProps'; import { CallToAction } from '@/components/landing/CallToAction'; import { TrustBar } from '@/components/landing/TrustBar'; import { PricingCards } from '@/components/pricing/PricingCards'; +import { KineticExplorer } from '@/components/landing/KineticExplorer'; export default function Home() { return ( diff --git a/components/mobile/MobileFooter.tsx b/components/mobile/MobileFooter.tsx index 303e290..7555d9b 100644 --- a/components/mobile/MobileFooter.tsx +++ b/components/mobile/MobileFooter.tsx @@ -1,26 +1,26 @@ -`use client +'use client' -import React from react -import Link from next/link +import React from 'react' +import Link from 'next/link' // Navigation links data const footerLinks = [ - { label: Home, href: / }, - { label: About, href: /about }, - { label: Services, href: /services }, - { label: Support, href: /support }, - { label: Privacy Policy, href: /privacy }, - { label: Terms of Service, href: /terms }, - { label: Contact, href: /contact }, - { label: FAQs, href: /faq }, + { label: 'Home', href: '/' }, + { label: 'About', href: '/about' }, + { label: 'Services', href: '/services' }, + { label: 'Support', href: '/support' }, + { label: 'Privacy Policy', href: '/privacy' }, + { label: 'Terms of Service', href: '/terms' }, + { label: 'Contact', href: '/contact' }, + { label: 'FAQs', href: '/faq' }, ] // Social icons data const socialLinks = [ - { label: Twitter, href: https://twitter.com/swiftchain, icon: 🐦 }, - { label: GitHub, href: https://github.com/swiftchain, icon: 🐙 }, - { label: LinkedIn, href: https://linkedin.com/company/swiftchain, icon: 🔗 }, - { label: Discord, href: https://discord.gg/swiftchain, icon: 💬 }, + { label: 'Twitter', href: 'https://twitter.com/swiftchain', icon: '🐦' }, + { label: 'GitHub', href: 'https://github.com/swiftchain', icon: '🐙' }, + { label: 'LinkedIn', href: 'https://linkedin.com/company/swiftchain', icon: '🔗' }, + { label: 'Discord', href: 'https://discord.gg/swiftchain', icon: '💬' }, ] export function MobileFooter() { @@ -36,7 +36,7 @@ export function MobileFooter() { key={link.href} href={link.href} className="rounded-lg px-3 py-2.5 text-sm text-gray-600 transition-colors hover:bg-gray-100 hover:text-gray-900 active:bg-gray-200 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-gray-100 dark:active:bg-gray-700" - style={{ minHeight: 44px }} + style={{ minHeight: '44px' }} > {link.label} @@ -53,7 +53,7 @@ export function MobileFooter() { rel="noopener noreferrer" className="flex h-11 w-11 items-center justify-center rounded-full text-xl transition-colors hover:bg-gray-100 hover:text-gray-900 dark:hover:bg-gray-800 dark:hover:text-gray-100" aria-label={social.label} - style={{ minHeight: 44px, minWidth: 44px }} + style={{ minHeight: '44px', minWidth: '44px' }} > {social.label}