feat(analytics-hubspot): modularize analytics and HubSpot integration

- Moved Google Analytics and HubSpot integration scripts to separate modules for better organization and maintainability.
- Implemented an AnalyticsManager class to handle Google Analytics initialization and privacy notice display.
- Created a HubSpotManager class to manage HubSpot widget loading and dark mode theming.
- Updated index.html to reference the new modules, improving code clarity and separation of concerns.
This commit is contained in:
chamikaJ
2025-07-23 14:36:50 +05:30
parent 9946c9a00e
commit 78516d8d6c
4 changed files with 239 additions and 108 deletions

View File

@@ -1,15 +1,13 @@
import { Col, ConfigProvider, Layout } from '@/shared/antd-imports';
import { Outlet, useNavigate } from 'react-router-dom';
import { Outlet } from 'react-router-dom';
import { memo, useMemo, useEffect, useRef } from 'react';
import { useMediaQuery } from 'react-responsive';
import Navbar from '../features/navbar/navbar';
import { useAppSelector } from '../hooks/useAppSelector';
import { useAppDispatch } from '../hooks/useAppDispatch';
import { colors } from '../styles/colors';
import { useRenderPerformance } from '@/utils/performance';
import HubSpot from '@/components/HubSpot';
import { DynamicCSSLoader, LayoutStabilizer } from '@/utils/css-optimizations';
const MainLayout = memo(() => {