Skip to content

Commit e4729b7

Browse files
Refactor: Replace Section component imports with EngagementModal in various containers
- Updated imports in blog, brand, contact, course, cta, donate, event, faq, funfact, gradation, newsletter, profile, quote, register-guide, service, team, testimonial, timeline, video, and zoom-meetings containers to use EngagementModal instead of the previous Section component. - Added EngagementModal component with custom animations and accessibility features. - Introduced EngagementModal styles for improved UI/UX.
1 parent bc3c9d2 commit e4729b7

File tree

64 files changed

+69
-67
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+69
-67
lines changed
File renamed without changes.

src/components/EngagementModal.tsx renamed to src/components/ui/engagement-modal/EngagementModal.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,13 @@ export const EngagementModal: React.FC<EngagementModalProps> = ({
2828
}) => {
2929
const [open, setOpen] = useState(false);
3030
const modalRef = useRef<HTMLDivElement>(null);
31-
// Add a ref to track if modal has been shown this session
32-
const hasInitialized = useRef(false);
31+
// DEBUG: Log mount and open state
32+
useEffect(() => {
33+
console.log("[EngagementModal] mounted, forceShow:", forceShow);
34+
}, []);
35+
useEffect(() => {
36+
console.log("[EngagementModal] open state:", open);
37+
}, [open]);
3338

3439
// Expose method to manually open modal for debugging
3540
// This can be called from browser console: window.openEngagementModal()
@@ -43,10 +48,7 @@ export const EngagementModal: React.FC<EngagementModalProps> = ({
4348
}, []);
4449

4550
useEffect(() => {
46-
if (typeof window === "undefined" || hasInitialized.current) return;
47-
48-
// Mark that we've initialized
49-
hasInitialized.current = true;
51+
if (typeof window === "undefined") return;
5052

5153
if (forceShow) {
5254
const timer = setTimeout(() => setOpen(true), 3000);
File renamed without changes.

src/components/vwc-grid/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Section from "@ui/section";
1+
import Section from "@components/ui/engagement-modal";
22
import { PropsWithChildren } from "react";
33

44
interface TProps {

src/containers/about/layout-01/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Section from "@ui/section";
1+
import Section from "@components/ui/engagement-modal";
22
import SectionTitle from "@components/section-title";
33
import Anchor from "@ui/anchor";
44
import { motion } from "motion/react";

src/containers/about/layout-02/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { motion } from "motion/react";
2-
import Section from "@ui/section";
2+
import Section from "@components/ui/engagement-modal";
33
import MottoText from "@ui/motto-text";
44
import SectionTitle from "@components/section-title";
55
import { useUI } from "@contexts/ui-context";

src/containers/app-download/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { motion } from "motion/react";
2-
import Section from "@ui/section";
2+
import Section from "@components/ui/engagement-modal";
33
import SectionTitle from "@components/section-title";
44
import Button from "@ui/button";
55
import Shape2 from "@assets/svgs/shape-2.svg";

src/containers/blog-full/layout-01/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { motion } from "motion/react";
2-
import Section from "@ui/section";
2+
import Section from "@components/ui/engagement-modal";
33
import BlogCard from "@components/blog-card/blog-03";
44
import Pagination from "@components/pagination/pagination-01";
55
import { IBlog } from "@utils/types";

src/containers/blog-full/layout-02/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { motion } from "motion/react";
2-
import Section from "@ui/section";
2+
import Section from "@components/ui/engagement-modal";
33
import BlogCard from "@components/blog-card/blog-04";
44
import BlogSidebar from "@containers/blog-details/blog-sidebar";
55
import Pagination from "@components/pagination/pagination-01";

src/containers/blog-full/layout-03/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { motion } from "motion/react";
2-
import Section from "@ui/section";
2+
import Section from "@components/ui/engagement-modal";
33
import BlogCard from "@components/blog-card/blog-05";
44
import BlogSidebar from "@containers/blog-details/blog-sidebar";
55
import Pagination from "@components/pagination/pagination-01";

0 commit comments

Comments
 (0)