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'
42import { vars } from '@theme'
53
64import { NotificationIcon } from './NotificationIcon'
@@ -34,7 +32,6 @@ export const EventsList = ({
3432 type,
3533 unitName,
3634} : IEventList ) : JSX . Element => {
37- const [ isMobile ] = useMediaQuery ( '(max-width: 580px)' )
3835 const border = `1px solid ${ vars ( 'colors-neutral-platinum' ) ?? '#E8E8E8' } `
3936
4037 const initOrEnd = [
@@ -61,30 +58,34 @@ export const EventsList = ({
6158
6259 return (
6360 < 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 >
6579 < 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"
7685 >
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 }
8687 </ Box >
87- ) }
88+ </ Box >
8889
8990 < Box display = "flex" flexDirection = "column" gap = "8px" w = "100%" >
9091 < Box
@@ -93,46 +94,19 @@ export const EventsList = ({
9394 justifyContent = "space-between"
9495 alignItems = "center"
9596 fontSize = "16px"
96- fontWeight = { isMobile ? '400' : ' 700' }
97+ fontWeight = " 700"
9798 >
9899 { name } { hasNotification && < NotificationIcon /> }
99100 </ Box >
100101
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-
120102 { 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 }
129105 </ Box >
130106 ) }
131107
132108 { showUnit && ! initOrEnd && (
133109 < Box display = "flex" gap = "4px" alignItems = "baseline" >
134- { isMobile && < Box height = "10px" width = "10px" bg = { color } borderRadius = "50%" /> }
135-
136110 < Box as = "span" sx = { detailTextStyle } >
137111 { unitName }
138112 </ Box >
0 commit comments