diff --git a/project/src/App.tsx b/project/src/App.tsx index 77b9373..44396df 100644 --- a/project/src/App.tsx +++ b/project/src/App.tsx @@ -2,16 +2,13 @@ import { useState, useEffect } from 'react'; import { Bird, Menu, X } from 'lucide-react'; import { motion, AnimatePresence } from 'framer-motion'; import { Home } from './components/Home'; -import { YachtSearch } from './components/YachtSearch'; import { TripCalculator } from './components/TripCalculator'; import { HowItWorks } from './components/HowItWorks'; import { About } from './components/About'; import { Contact } from './components/Contact'; import { OffsetOrder } from './components/OffsetOrder'; -import { getVesselData } from './api/aisClient'; -import { calculateTripCarbon } from './utils/carbonCalculator'; import { analytics } from './utils/analytics'; -import type { VesselData, CarbonCalculation, CalculatorType } from './types'; +import type { VesselData, CalculatorType } from './types'; const sampleVessel: VesselData = { imo: "1234567", @@ -23,9 +20,6 @@ const sampleVessel: VesselData = { }; function App() { - const [loading, setLoading] = useState(false); - const [error, setError] = useState(null); - const [vesselData, setVesselData] = useState(null); const [currentPage, setCurrentPage] = useState<'home' | 'calculator' | 'how-it-works' | 'about' | 'contact'>('home'); const [showOffsetOrder, setShowOffsetOrder] = useState(false); const [offsetTons, setOffsetTons] = useState(0); @@ -37,21 +31,6 @@ function App() { analytics.pageView(window.location.pathname); }, [currentPage]); - const handleSearch = async (imo: string) => { - setLoading(true); - setError(null); - setVesselData(null); - - try { - const vessel = await getVesselData(imo); - setVesselData(vessel); - } catch (err) { - setError('Unable to fetch vessel data. Please verify the IMO number and try again.'); - } finally { - setLoading(false); - } - }; - const handleOffsetClick = (tons: number, monetaryAmount?: number) => { setOffsetTons(tons); setMonetaryAmount(monetaryAmount);