From 98e5b5e633969da88b9145ac32d6bbe8c21a3f8e Mon Sep 17 00:00:00 2001 From: Matt Date: Fri, 31 Oct 2025 22:30:37 +0100 Subject: [PATCH] Fix unused React imports in project/src directory Remove unused 'React' imports from App.tsx and all component files in project/src/components/. These imports are not needed with the modern JSX transform and were causing TypeScript build errors in strict mode. Files updated: - project/src/App.tsx - project/src/components/About.tsx - project/src/components/CarbonOffset.tsx - project/src/components/Contact.tsx - project/src/components/CurrencySelect.tsx - project/src/components/ErrorBoundary.tsx - project/src/components/Home.tsx - project/src/components/HowItWorks.tsx - project/src/components/OffsetOrder.tsx - project/src/components/PuffinAdvantage.tsx - project/src/components/TripCalculator.tsx - project/src/components/YachtSearch.tsx This fixes the Docker build failure caused by TypeScript strict mode detecting unused variables. --- project/src/App.tsx | 2 +- project/src/components/About.tsx | 2 +- project/src/components/CarbonOffset.tsx | 2 +- project/src/components/Contact.tsx | 2 +- project/src/components/CurrencySelect.tsx | 2 +- project/src/components/ErrorBoundary.tsx | 2 +- project/src/components/Home.tsx | 2 +- project/src/components/HowItWorks.tsx | 2 +- project/src/components/OffsetOrder.tsx | 2 +- project/src/components/PuffinAdvantage.tsx | 2 +- project/src/components/TripCalculator.tsx | 2 +- project/src/components/YachtSearch.tsx | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/project/src/App.tsx b/project/src/App.tsx index fc5288f..77b9373 100644 --- a/project/src/App.tsx +++ b/project/src/App.tsx @@ -1,4 +1,4 @@ -import React, { useState, useEffect } from 'react'; +import { useState, useEffect } from 'react'; import { Bird, Menu, X } from 'lucide-react'; import { motion, AnimatePresence } from 'framer-motion'; import { Home } from './components/Home'; diff --git a/project/src/components/About.tsx b/project/src/components/About.tsx index c47456d..b618e43 100644 --- a/project/src/components/About.tsx +++ b/project/src/components/About.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +// React import removed - not needed with JSX transform import { Anchor, Heart, Leaf, Scale, CreditCard, FileCheck, Handshake, Rocket } from 'lucide-react'; interface Props { diff --git a/project/src/components/CarbonOffset.tsx b/project/src/components/CarbonOffset.tsx index b0adc7e..f872bce 100644 --- a/project/src/components/CarbonOffset.tsx +++ b/project/src/components/CarbonOffset.tsx @@ -1,4 +1,4 @@ -import React, { useState } from 'react'; +import { useState } from 'react'; import { Leaf } from 'lucide-react'; import type { CarbonCalculation, CurrencyCode } from '../types'; import { currencies, formatCurrency } from '../utils/currencies'; diff --git a/project/src/components/Contact.tsx b/project/src/components/Contact.tsx index 633e369..924dbe8 100644 --- a/project/src/components/Contact.tsx +++ b/project/src/components/Contact.tsx @@ -1,4 +1,4 @@ -import React, { useState } from 'react'; +import { useState } from 'react'; import { Mail, Phone, Loader2, AlertCircle } from 'lucide-react'; import { validateEmail, sendFormspreeEmail } from '../utils/email'; import { analytics } from '../utils/analytics'; diff --git a/project/src/components/CurrencySelect.tsx b/project/src/components/CurrencySelect.tsx index a335963..f6091d0 100644 --- a/project/src/components/CurrencySelect.tsx +++ b/project/src/components/CurrencySelect.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +// React import removed - not needed with JSX transform import type { CurrencyCode } from '../types'; import { currencies } from '../utils/currencies'; diff --git a/project/src/components/ErrorBoundary.tsx b/project/src/components/ErrorBoundary.tsx index 36b6429..0573272 100644 --- a/project/src/components/ErrorBoundary.tsx +++ b/project/src/components/ErrorBoundary.tsx @@ -1,4 +1,4 @@ -import React, { Component, ErrorInfo, ReactNode } from 'react'; +import { Component, ErrorInfo, ReactNode } from 'react'; import { AlertCircle } from 'lucide-react'; interface Props { diff --git a/project/src/components/Home.tsx b/project/src/components/Home.tsx index d52f643..4068d09 100644 --- a/project/src/components/Home.tsx +++ b/project/src/components/Home.tsx @@ -1,4 +1,4 @@ -import React, { useEffect, useRef } from 'react'; +import { useEffect, useRef } from 'react'; import { Anchor, Globe, BarChart } from 'lucide-react'; import { motion } from 'framer-motion'; diff --git a/project/src/components/HowItWorks.tsx b/project/src/components/HowItWorks.tsx index 67a69bd..37f79d0 100644 --- a/project/src/components/HowItWorks.tsx +++ b/project/src/components/HowItWorks.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +// React import removed - not needed with JSX transform import { Leaf, Anchor, Calculator, Globe, BarChart } from 'lucide-react'; interface Props { diff --git a/project/src/components/OffsetOrder.tsx b/project/src/components/OffsetOrder.tsx index 8c64fce..4fad367 100644 --- a/project/src/components/OffsetOrder.tsx +++ b/project/src/components/OffsetOrder.tsx @@ -1,4 +1,4 @@ -import React, { useState, useEffect } from 'react'; +import { useState, useEffect } from 'react'; import { Check, AlertCircle, ArrowLeft, Loader2, Globe2, TreePine, Waves, Factory, Wind, X } from 'lucide-react'; import { motion } from 'framer-motion'; import { createOffsetOrder, getPortfolios } from '../api/wrenClient'; diff --git a/project/src/components/PuffinAdvantage.tsx b/project/src/components/PuffinAdvantage.tsx index 9a88e8c..c3a799b 100644 --- a/project/src/components/PuffinAdvantage.tsx +++ b/project/src/components/PuffinAdvantage.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +// React import removed - not needed with JSX transform import { Laptop, Leaf, Scale, CreditCard, FileCheck, Handshake } from 'lucide-react'; interface Props { diff --git a/project/src/components/TripCalculator.tsx b/project/src/components/TripCalculator.tsx index 3ee6fba..ae799b5 100644 --- a/project/src/components/TripCalculator.tsx +++ b/project/src/components/TripCalculator.tsx @@ -1,4 +1,4 @@ -import React, { useState, useCallback } from 'react'; +import { useState, useCallback } from 'react'; import { Route } from 'lucide-react'; import { motion, AnimatePresence } from 'framer-motion'; import type { VesselData, TripEstimate, CurrencyCode } from '../types'; diff --git a/project/src/components/YachtSearch.tsx b/project/src/components/YachtSearch.tsx index f431988..4a5e52c 100644 --- a/project/src/components/YachtSearch.tsx +++ b/project/src/components/YachtSearch.tsx @@ -1,4 +1,4 @@ -import React, { useState } from 'react'; +import { useState } from 'react'; import { Search } from 'lucide-react'; interface Props {