Fix unused React imports in project/src directory
Some checks failed
Build and Push Docker Images / docker (push) Failing after 2m0s

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.
This commit is contained in:
Matt 2025-10-31 22:30:37 +01:00
parent 82f72941ca
commit 98e5b5e633
12 changed files with 12 additions and 12 deletions

View File

@ -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';

View File

@ -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 {

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -1,4 +1,4 @@
import React, { Component, ErrorInfo, ReactNode } from 'react';
import { Component, ErrorInfo, ReactNode } from 'react';
import { AlertCircle } from 'lucide-react';
interface Props {

View File

@ -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';

View File

@ -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 {

View File

@ -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';

View File

@ -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 {

View File

@ -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';

View File

@ -1,4 +1,4 @@
import React, { useState } from 'react';
import { useState } from 'react';
import { Search } from 'lucide-react';
interface Props {