diff --git a/src/data/home-content.html b/src/data/home-content.html index 3ebdaad..92adbca 100644 --- a/src/data/home-content.html +++ b/src/data/home-content.html @@ -21,60 +21,6 @@ cooling System.

-
-
-
-
-
-
-
- ShapeAbout Us

Building Future with Integrity

Profen Engineering, your trusted partner in comprehensive Sustainability, MEP &Construction Services. With a commitment to excellence, innovation, and client satisfaction, we stand as a beacon of reliability in the construction industry.

- -
-
-
-
-
about_media_1

Efficient Use of Resources

Cost-effective planning to maximize value

about_media_2

Focus on Quality & Safety

Built into every stage of the plan.

-
-
- -
-
-
-
- -
-
-

Call Us

- -
-
-
-
-
-
-
-
-
aboutcooling

80+

SATISFIED CLIENTS

- - - - - - - - PROFEN ENGINEERING LLC - - -
about_badge
-
-
-
-
-
@@ -264,6 +210,48 @@ Chiller Hot & Cool Solution
+
+
+
+
+
+
+ ShapeAbout Us

Building Future with Integrity

Profen Engineering, your trusted partner in comprehensive Sustainability, MEP &Construction Services. With a commitment to excellence, innovation, and client satisfaction, we stand as a beacon of reliability in the construction industry.

+ +
+
+
+
+
about_media_1

Efficient Use of Resources

Cost-effective planning to maximize value

about_media_2

Focus on Quality & Safety

Built into every stage of the plan.

+
+
+ +
+
+
+
+ +
+
+

Call Us

+ +
+
+
+
+
+
+
+
+
aboutcooling

80+

SATISFIED CLIENTS

+
+
+
+
diff --git a/src/hooks/useLayoutInit.js b/src/hooks/useLayoutInit.js index c82e64b..a9f84b4 100644 --- a/src/hooks/useLayoutInit.js +++ b/src/hooks/useLayoutInit.js @@ -4,42 +4,17 @@ import { useLocation } from 'react-router-dom' export default function useLayoutInit() { const { pathname } = useLocation() - // Re-initialize theme JS on route change useEffect(() => { let destroyed = false let rafId = null function tryInit() { - if (destroyed) return - - // Apply data-bg-src to elements - document.querySelectorAll('[data-bg-src]').forEach(el => { - const src = el.getAttribute('data-bg-src') - if (src && !el.classList.contains('background-image')) { - el.style.backgroundImage = `url(${src})` - el.classList.add('background-image') - } - }) - - // Check if jQuery and theme init function are ready - if (typeof window.jQuery === 'function' && typeof window.rakar_content_load_scripts === 'function') { - try { - // Destroy ALL existing swiper instances to prevent duplicates - document.querySelectorAll('.swiper').forEach(el => { - if (el.swiper) { - try { el.swiper.destroy(true, true) } catch (e) { console.warn('useLayoutInit: swiper destroy failed:', e) } - } - }) - - // Run theme initialization - window.rakar_content_load_scripts() - - window.__layoutReady = true - window.dispatchEvent(new Event('layout-ready')) - return true - } catch (e) { - console.warn('Theme init error:', e) - } + if (destroyed) return false + if (typeof window.rakar_content_load_scripts === 'function') { + window.rakar_content_load_scripts() + window.__layoutReady = true + window.dispatchEvent(new Event('layout-ready')) + return true } return false }