1
- import { Text , Timeline } from '@mantine/core' ;
2
- import { AnnotationIcon } from '@heroicons/react/solid' ;
3
- import { useEffect , useState } from 'react' ;
1
+ import { Text , Timeline } from '@mantine/core'
2
+ import { AnnotationIcon } from '@heroicons/react/solid'
3
+ import { useEffect , useState } from 'react'
4
4
const data = [
5
5
{
6
6
label : 'Submission of Full-length Manuscript (opens from)' ,
@@ -9,25 +9,23 @@ const data = [
9
9
{
10
10
label : 'Last date to submit Full-length Manuscript' ,
11
11
date : '14th August 2024' ,
12
-
13
12
} ,
14
13
{
15
14
label : 'Notification of Acceptance' ,
16
15
oldDate : '28th August 2024' ,
17
- newDate :'7th September 2024' ,
16
+ newDate : '7th September 2024' ,
18
17
} ,
19
18
{
20
19
label : 'Early Bird Registration' ,
21
- date :'Before 18th September 2024' ,
20
+ date : 'Before 18th September 2024' ,
22
21
} ,
23
- {
22
+ {
24
23
label : 'Last Date for Registration' ,
25
- date : '3rd October 2024' ,
26
-
24
+ oldDate : '3rd October 2024' ,
27
25
} ,
28
26
{
29
27
label : 'Submission of Camera-ready Manuscript and Copyright Form' ,
30
- date :'7th October 2024',
28
+ date : '10th October 2024',
31
29
} ,
32
30
33
31
{
@@ -38,29 +36,27 @@ const data = [
38
36
label : 'Conference Dates' ,
39
37
date : '8th and 9th November 2024' ,
40
38
} ,
41
- ] ;
39
+ ]
42
40
43
41
export default function CustomTimeLine ( ) {
44
- const [ isVisible , setIsVisible ] = useState ( false ) ;
42
+ const [ isVisible , setIsVisible ] = useState ( false )
45
43
46
44
useEffect ( ( ) => {
47
45
const handleScroll = ( ) => {
48
46
if ( window . scrollY > 100 ) {
49
- setIsVisible ( true ) ;
47
+ setIsVisible ( true )
50
48
} else {
51
- setIsVisible ( false ) ;
49
+ setIsVisible ( false )
52
50
}
53
- } ;
51
+ }
54
52
55
- window . addEventListener ( 'scroll' , handleScroll ) ;
56
- return ( ) => window . removeEventListener ( 'scroll' , handleScroll ) ;
57
- } , [ ] ) ;
53
+ window . addEventListener ( 'scroll' , handleScroll )
54
+ return ( ) => window . removeEventListener ( 'scroll' , handleScroll )
55
+ } , [ ] )
58
56
59
57
return (
60
58
< div className = { `timeline-container ${ isVisible ? 'fade-in' : '' } ` } >
61
- < h1 className = "timeline-title" >
62
- Important Dates
63
- </ h1 >
59
+ < h1 className = "timeline-title" > Important Dates</ h1 >
64
60
< Timeline active = { 0 } bulletSize = { 28 } lineWidth = { 4 } color = "teal" >
65
61
{ data . map ( ( item , index ) => (
66
62
< Timeline . Item
@@ -72,9 +68,12 @@ export default function CustomTimeLine() {
72
68
< Text size = "lg" mt = { 2 } className = "timeline-item-text" >
73
69
{ item . oldDate ? (
74
70
< >
75
- < span className = "line-through text-gray-500" > { item . oldDate } </ span >
76
- { ' ' }
77
- < span className = "font-bold text-gray-900" > { item . newDate } </ span >
71
+ < span className = "text-gray-500 line-through" >
72
+ { item . oldDate }
73
+ </ span > { ' ' }
74
+ < span className = "font-bold text-gray-900" >
75
+ { item . newDate }
76
+ </ span >
78
77
</ >
79
78
) : (
80
79
item . date
@@ -84,5 +83,5 @@ export default function CustomTimeLine() {
84
83
) ) }
85
84
</ Timeline >
86
85
</ div >
87
- ) ;
86
+ )
88
87
}
0 commit comments