From bf9a5c65bc1a8da9bc09b3ebd2dcc306dfd7a73e Mon Sep 17 00:00:00 2001 From: Your Name <119736744+aborayan2022@users.noreply.github.com> Date: Sun, 22 Mar 2026 20:15:35 +0200 Subject: [PATCH] perf(frontend): reduce initial rendering cost --- frontend/index.html | 25 ++++++++++++- frontend/src/App.tsx | 12 ++++--- frontend/src/components/layout/AdSlot.tsx | 36 +++++++++++++++---- .../src/components/seo/ToolLandingPage.tsx | 2 +- .../src/components/tools/BarcodeGenerator.tsx | 2 +- .../src/components/tools/QrCodeGenerator.tsx | 2 +- frontend/src/pages/HomePage.tsx | 7 ++-- frontend/src/pages/PricingPage.tsx | 6 ++-- frontend/src/pages/SeoCollectionPage.tsx | 8 ++--- frontend/src/pages/SeoPage.tsx | 12 +++---- frontend/src/styles/global.css | 6 ++++ 11 files changed, 89 insertions(+), 29 deletions(-) diff --git a/frontend/index.html b/frontend/index.html index 2afc173..b5682ff 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -23,11 +23,34 @@ + - + + Dociva — Free Online File Tools diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 49c2baf..f7264bb 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -3,8 +3,6 @@ import { Routes, Route, useLocation } from 'react-router-dom'; import { Toaster } from 'sonner'; import Header from '@/components/layout/Header'; import Footer from '@/components/layout/Footer'; -import CookieConsent from '@/components/layout/CookieConsent'; -import SiteAssistant from '@/components/layout/SiteAssistant'; import ErrorBoundary from '@/components/shared/ErrorBoundary'; import ToolLandingPage from '@/components/seo/ToolLandingPage'; import { useDirection } from '@/hooks/useDirection'; @@ -27,6 +25,8 @@ const BlogPostPage = lazy(() => import('@/pages/BlogPostPage')); const DevelopersPage = lazy(() => import('@/pages/DevelopersPage')); const InternalAdminPage = lazy(() => import('@/pages/InternalAdminPage')); const SeoRoutePage = lazy(() => import('@/pages/SeoRoutePage')); +const CookieConsent = lazy(() => import('@/components/layout/CookieConsent')); +const SiteAssistant = lazy(() => import('@/components/layout/SiteAssistant')); // Tool Pages const PdfToWord = lazy(() => import('@/components/tools/PdfToWord')); @@ -72,6 +72,7 @@ const FlattenPdf = lazy(() => import('@/components/tools/FlattenPdf')); const RepairPdf = lazy(() => import('@/components/tools/RepairPdf')); const PdfMetadata = lazy(() => import('@/components/tools/PdfMetadata')); const ImageCrop = lazy(() => import('@/components/tools/ImageCrop')); +const ImageToSvg = lazy(() => import('@/components/tools/ImageToSvg')); const ImageRotateFlip = lazy(() => import('@/components/tools/ImageRotateFlip')); const BarcodeGenerator = lazy(() => import('@/components/tools/BarcodeGenerator')); @@ -145,6 +146,7 @@ export default function App() { } /> } /> } /> + } /> {/* Convert Tools */} } /> @@ -196,8 +198,10 @@ export default function App() {