1
- import { Calendar } from '@/atoms/Icons/Calendar'
2
- import { Clock } from '@/atoms/Icons/Clock'
3
- import { Box , useMediaQuery } from '@chakra-ui/react'
1
+ import { Box } from '@chakra-ui/react'
4
2
import { vars } from '@theme'
5
3
6
4
import { NotificationIcon } from './NotificationIcon'
@@ -34,7 +32,6 @@ export const EventsList = ({
34
32
type,
35
33
unitName,
36
34
} : IEventList ) : JSX . Element => {
37
- const [ isMobile ] = useMediaQuery ( '(max-width: 580px)' )
38
35
const border = `1px solid ${ vars ( 'colors-neutral-platinum' ) ?? '#E8E8E8' } `
39
36
40
37
const initOrEnd = [
@@ -61,30 +58,34 @@ export const EventsList = ({
61
58
62
59
return (
63
60
< Box className = "eventsList" borderTop = { border } p = "16px 24px" display = "flex" gap = "12px" >
64
- { ! isMobile && (
61
+ < Box
62
+ bg = { color }
63
+ minW = "80px"
64
+ minH = "80px"
65
+ maxW = "80px"
66
+ maxH = "80px"
67
+ borderRadius = "4px"
68
+ p = "8px"
69
+ display = "flex"
70
+ flexDirection = "column"
71
+ justifyContent = "space-around"
72
+ >
73
+ < Box as = "span" sx = { dateTextStyle } >
74
+ { day }
75
+ </ Box >
76
+ < Box as = "span" sx = { dateTextStyle } >
77
+ { date }
78
+ </ Box >
65
79
< Box
66
- bg = { color }
67
- minW = "80px"
68
- minH = "80px"
69
- maxW = "80px"
70
- maxH = "80px"
71
- borderRadius = "4px"
72
- p = "8px"
73
- display = "flex"
74
- flexDirection = "column"
75
- justifyContent = "space-around"
80
+ as = "span"
81
+ fontSize = "14px"
82
+ fontWeight = "700"
83
+ color = { vars ( 'colors-neutral-white' ) }
84
+ lineHeight = "normal"
76
85
>
77
- < Box as = "span" sx = { dateTextStyle } >
78
- { day }
79
- </ Box >
80
- < Box as = "span" sx = { dateTextStyle } >
81
- { date }
82
- </ Box >
83
- < Box as = "span" fontSize = "14px" fontWeight = "700" color = { vars ( 'colors-neutral-white' ) } >
84
- { time }
85
- </ Box >
86
+ { time }
86
87
</ Box >
87
- ) }
88
+ </ Box >
88
89
89
90
< Box display = "flex" flexDirection = "column" gap = "8px" w = "100%" >
90
91
< Box
@@ -93,46 +94,19 @@ export const EventsList = ({
93
94
justifyContent = "space-between"
94
95
alignItems = "center"
95
96
fontSize = "16px"
96
- fontWeight = { isMobile ? '400' : ' 700' }
97
+ fontWeight = " 700"
97
98
>
98
99
{ name } { hasNotification && < NotificationIcon /> }
99
100
</ Box >
100
101
101
- { isMobile && (
102
- < Box lineHeight = "normal" sx = { { '>svg' : { marginRight : '4px' } } } >
103
- < Calendar />
104
- < Box
105
- as = "span"
106
- verticalAlign = "middle"
107
- p = "0 8px 0 0"
108
- borderRight = { `1px solid ${ vars ( 'colors-neutral-platinum' ) } ` }
109
- mr = "8px"
110
- >
111
- { day } { date }
112
- </ Box >
113
- < Clock />
114
- < Box as = "span" verticalAlign = "middle" >
115
- { time }
116
- </ Box >
117
- </ Box >
118
- ) }
119
-
120
102
{ showCourse && ! initOrEnd && (
121
- < Box display = "flex" gap = "4px" alignItems = "baseline" >
122
- { isMobile && (
123
- < Box minH = "10px" minW = "10px" maxH = "10px" maxW = "10px" bg = { color } borderRadius = "50%" />
124
- ) }
125
-
126
- < Box as = "span" sx = { detailTextStyle } >
127
- < strong > { text ? `${ text } :` : 'Curso:' } </ strong > { courseName }
128
- </ Box >
103
+ < Box as = "span" sx = { detailTextStyle } >
104
+ < strong > { text ? `${ text } :` : 'Curso:' } </ strong > { courseName }
129
105
</ Box >
130
106
) }
131
107
132
108
{ showUnit && ! initOrEnd && (
133
109
< Box display = "flex" gap = "4px" alignItems = "baseline" >
134
- { isMobile && < Box height = "10px" width = "10px" bg = { color } borderRadius = "50%" /> }
135
-
136
110
< Box as = "span" sx = { detailTextStyle } >
137
111
{ unitName }
138
112
</ Box >
0 commit comments