feat(hubspot-integration): add HubSpot script component for production environment

- Introduced a new HubSpot component that dynamically loads the HubSpot tracking script when in production.
- Updated MainLayout to replace TawkTo with HubSpot for improved customer engagement tracking.
This commit is contained in:
chamiakJ
2025-05-21 11:42:42 +05:30
parent 0cb0efe43e
commit 2bdae400ac
2 changed files with 26 additions and 4 deletions

View File

@@ -7,7 +7,7 @@ import { colors } from '../styles/colors';
import { verifyAuthentication } from '@/features/auth/authSlice';
import { useEffect } from 'react';
import { useAppDispatch } from '@/hooks/useAppDispatch';
import TawkTo from '@/components/TawkTo';
import HubSpot from '@/components/HubSpot';
const MainLayout = () => {
const themeMode = useAppSelector(state => state.themeReducer.mode);
@@ -68,9 +68,7 @@ const MainLayout = () => {
<Outlet />
</Col>
</Layout.Content>
{import.meta.env.VITE_APP_ENV === 'production' && (
<TawkTo propertyId="67ecc524f62fbf190db18bde" widgetId="1inqe45sq" />
)}
{import.meta.env.VITE_APP_ENV === 'production' && <HubSpot />}
</Layout>
</ConfigProvider>
);