Skip to content

Commit 8cae7f5

Browse files
committed
fix2
1 parent 7caff00 commit 8cae7f5

File tree

2 files changed

+34
-46
lines changed

2 files changed

+34
-46
lines changed

components/TimeLine.tsx

Lines changed: 34 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,45 @@
1-
import { useEffect, useRef } from 'react';
21
import { Text, Timeline } from '@mantine/core';
32
import { AnnotationIcon } from '@heroicons/react/solid';
43

54

65
export default function CustomTimeLine() {
76
const data = [
8-
{ label: 'Submission of Full-length Manuscript (opens from)', date: '5th July 2024' },
9-
{ label: 'Last date to submit Full-length Manuscript', date: '30th July 2024' },
10-
{ label: 'Notification of Acceptance', date: '28th August 2024' },
11-
{ label: 'Early Bird Registration', date: 'Before 18th September 2024' },
12-
{ label: 'Submission of Camera-ready Manuscript and Copyright Form', date: '10th October 2024' },
13-
{ label: 'Last Date for Registration', date: '15th October 2024' },
14-
{ label: 'Pre-Conference Tutorial', date: '7th November 2024' },
15-
{ label: 'Conference Dates', date: '8th and 9th November 2024' },
7+
{
8+
label: 'Submission of Full-length Manuscript (opens from)',
9+
date: '5th July 2024',
10+
},
11+
{
12+
label: 'Last date to submit Full-length Manuscript',
13+
date: '30th July 2024',
14+
},
15+
{
16+
label: 'Notification of Acceptance',
17+
date: '28th August 2024',
18+
},
19+
{
20+
label: 'Early Bird Registration',
21+
date: 'Before 18th September 2024',
22+
},
23+
{
24+
label: 'Submission of Camera-ready Manuscript and Copyright Form',
25+
date: '10th October 2024',
26+
},
27+
{
28+
label: 'Last Date for Registration',
29+
date: '15th October 2024',
30+
},
31+
{
32+
label: 'Pre-Conference Tutorial',
33+
date: '7th November 2024',
34+
},
35+
{
36+
label: 'Conference Dates',
37+
date: '8th and 9th November 2024',
38+
},
1639
];
1740

18-
const observer = useRef();
19-
20-
useEffect(() => {
21-
observer.current = new IntersectionObserver(
22-
(entries) => {
23-
entries.forEach((entry) => {
24-
if (entry.isIntersecting) {
25-
entry.target.classList.add('fade-in-visible');
26-
}
27-
});
28-
},
29-
{ threshold: 0.1 }
30-
);
31-
32-
const elements = document.querySelectorAll('.fade-in');
33-
elements.forEach((element) => observer.current.observe(element));
34-
35-
return () => {
36-
if (observer.current) {
37-
observer.current.disconnect();
38-
}
39-
};
40-
}, []);
41-
4241
return (
43-
<div>
42+
<div className="fade-in">
4443
<h1 className="my-4 bg-gradient-to-r from-green-300 via-blue-500 to-purple-600 bg-clip-text text-3xl font-extrabold text-transparent underline">
4544
Important Dates
4645
</h1>
@@ -50,7 +49,7 @@ export default function CustomTimeLine() {
5049
key={index}
5150
bullet={<AnnotationIcon className="h-6 w-6 text-teal-500" />}
5251
title={<span className="font-semibold text-lg">{item.label}</span>}
53-
className="my-2 fade-in"
52+
className="my-2"
5453
>
5554
<Text size="md" mt={4} className="text-gray-700">
5655
{item.date}

styles/globals.css

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -100,16 +100,5 @@
100100
height: 100%;
101101
display: block;
102102
}
103-
/* CustomTimeLine.css */
104-
.fade-in {
105-
opacity: 0;
106-
transform: translateY(20px);
107-
transition: opacity 0.5s ease-out, transform 0.5s ease-out;
108-
}
109-
110-
.fade-in-visible {
111-
opacity: 1;
112-
transform: translateY(0);
113-
}
114103

115104

0 commit comments

Comments
 (0)