import { Toaster } from "@/components/ui/toaster"; import { Toaster as Sonner } from "@/components/ui/sonner"; import { TooltipProvider } from "@/components/ui/tooltip"; import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; import { BrowserRouter, Routes, Route } from "react-router-dom"; import { HelmetProvider } from 'react-helmet-async'; import React, { Suspense, useEffect } from "react"; import ScrollToTop from "@/components/ScrollToTop"; import LoadingFallback from "@/components/LoadingFallback"; import Analytics from "@/components/Analytics"; import OrganizationSchema from "@/components/OrganizationSchema"; import GoogleSearchConsole from "@/components/GoogleSearchConsole"; import CoreWebVitals from "@/components/CoreWebVitals"; import ServiceWorkerRegistration from "@/components/ServiceWorkerRegistration"; import CriticalResourceLoader from "@/components/CriticalResourceLoader"; import StickyCTA from "@/components/StickyCTA"; import MobilePhoneButton from "@/components/MobilePhoneButton"; import ExitIntentPopup from "@/components/ExitIntentPopup"; import SocialProofToasts from "@/components/SocialProofToasts"; import Index from "./pages/Index"; import OgImage from "./pages/OgImage"; import NotFound from "./pages/NotFound"; import { initializeSecurity } from "@/utils/security"; import { useVisitorTracking } from "@/hooks/useVisitorTracking"; // Import SEO audit utility import "@/utils/seoAudit"; // Lazy load non-critical pages import LazyMisfitMethod from "./pages/LazyMisfitMethod"; import LazyServices from "./pages/LazyServices"; import LazyTestimonials from "./pages/LazyTestimonials"; import LazySTRInsights from "./pages/LazySTRInsights"; import LazyCaseStudies from "./pages/LazyCaseStudies"; import LazyWhatToExpect from "./pages/LazyWhatToExpect"; import LazyScheduleCall from "./pages/LazyScheduleCall"; import LazyContactUs from "./pages/LazyContactUs"; import LazyRevenueCalculator from "./pages/LazyRevenueCalculator"; import LazyBlogArticleDetail from "./pages/LazyBlogArticleDetail"; import LazyApplyNow from "./pages/LazyApplyNow"; // Lazy load service detail pages const LazyPropertyDesign = React.lazy(() => import('./pages/services/PropertyDesign')); const LazyRevenueOptimization = React.lazy(() => import('./pages/services/RevenueOptimization')); const LazyGuestServices = React.lazy(() => import('./pages/services/GuestServices')); const LazyPropertyMaintenance = React.lazy(() => import('./pages/services/PropertyMaintenance')); const LazyPermitCompliance = React.lazy(() => import('./pages/services/PermitCompliance')); // Lazy location page wrapper const LazyLocationPage = ({ component }: { component: () => Promise }) => { const Component = React.lazy(component); return ; }; const queryClient = new QueryClient({ defaultOptions: { queries: { staleTime: 5 * 60 * 1000, // 5 minutes gcTime: 10 * 60 * 1000, // 10 minutes }, }, }); const AppRoutes = () => { useVisitorTracking(); return ( }> } /> } /> } /> }>} /> }>} /> }>} /> }>} /> }>} /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> {/* High-Value Content Pages */} }> import('./pages/NashvilleSTRRegulations')} />} /> }> import('./pages/AirbnbVsVRBO')} />} /> {/* Location Pages */} }> import('./pages/locations/SoBro')} />} /> }> import('./pages/locations/TheGulch')} />} /> }> import('./pages/locations/Midtown')} />} /> }> import('./pages/locations/EastNashville')} />} /> }> import('./pages/locations/TwelveSouth')} />} /> }> import('./pages/locations/Germantown')} />} /> }> import('./pages/locations/WedgewoodHouston')} />} /> }> import('./pages/locations/Edgehill')} />} /> }> import('./pages/locations/SylvanPark')} />} /> }> import('./pages/locations/BelmontHillsboro')} />} /> }> import('./pages/locations/WestEnd')} />} /> } /> } /> ); }; const App = () => { useEffect(() => { // Initialize security measures initializeSecurity(); }, []); return ( ); }; export default App;