@@ -11,7 +11,7 @@ import { ICalendarDropdown } from '../types'
1111export const CalendarDropdownContainer = ( {
1212 events,
1313 loading,
14- t ,
14+ text ,
1515 now,
1616 redirectToCalendar,
1717 courseColors : colors ,
@@ -22,20 +22,6 @@ export const CalendarDropdownContainer = ({
2222 const [ isTooltipDisabled , setTooltipDisabled ] = useState ( false )
2323 const [ isMenuOpen , setMenuOpen ] = useState ( false )
2424
25- const text = {
26- buttonCalendar : t ( 'CalendarGoto' ) ,
27- course : t ( 'CalendarCourse' ) ,
28- empty : t ( 'CalendarDontEvent' ) ,
29- events : {
30- today : t ( 'CalendarToday' ) ,
31- tomorrow : t ( 'CalendarTomorrow' ) ,
32- next : t ( 'CalendarNext' ) ,
33- } ,
34- header : t ( 'CalendarNextDates' ) ,
35- loading : t ( 'Cargando' ) ,
36- tooltip : t ( 'Calendar' ) ,
37- }
38-
3925 // Resuelve tooltip que se mantiene visible al cerrar el menu
4026 useEffect ( ( ) => {
4127 if ( isMenuOpen ) {
@@ -59,18 +45,23 @@ export const CalendarDropdownContainer = ({
5945 position = "relative"
6046 sx = { {
6147 '>div' : {
62- transform : 'translate3d(-409px, 38px, 0px) !important' ,
48+ position : isMobile ? 'fixed !important' : 'absolute' ,
49+ left : isMobile ? '0 !important' : 'auto' ,
50+ top : isMobile ? '62px !important' : 'auto' ,
51+ transform : isMobile ? 'none !important' : 'translate3d(-409px, 38px, 0px) !important' ,
6352 } ,
53+
6454 '.chakra-menu__menu-list' : {
55+ position : 'absolute' ,
56+ width : isMobile ? '100vw' : '500px' ,
57+ maxHeight : isMobile ? 'calc(100vh - 62px)' : 'auto' ,
58+ overflowY : isMobile ? 'auto' : 'hidden' ,
6559 borderRadius : isMobile ? '0' : '10px' ,
6660 boxShadow : isMobile ? 'none' : 'rgba(47, 47, 47, 0.2) -1px 6px 40px 0px' ,
67- width : isMobile ? '100vw' : '500px' ,
68- height : isMobile || empty ? 'auto' : '560px' ,
6961 animation : 'none !important' ,
7062 transition : 'none !important' ,
7163 transform : 'none !important' ,
7264 opacity : '1 !important' ,
73- position : 'absolute' ,
7465 } ,
7566 '.chakra-menu__group__title' : {
7667 fontSize : '18px' ,
@@ -87,15 +78,18 @@ export const CalendarDropdownContainer = ({
8778 < >
8879 < GoToCalendar
8980 hasNew = { hasNew ?? false }
90- text = { text . tooltip }
81+ text = { text ? .tooltip || 'Ir a Mi Calendario' }
9182 tooltipDisabled = { isTooltipDisabled }
9283 />
9384 < MenuList >
94- < Header text = { text . header } isMobile = { isMobile } />
85+ < Header
86+ text = { text ?. header || 'Próximas fechas importantes de tus cursos' }
87+ isMobile = { isMobile }
88+ />
9589 { loading ? (
96- < Loading text = { text . loading } />
90+ < Loading text = { text ? .loading || 'Cargando' } />
9791 ) : events . length === 0 || empty ? (
98- < Empty text = { text . empty } />
92+ < Empty text = { text ? .empty || 'Aún no tienes eventos en tu calendario' } />
9993 ) : (
10094 < Events
10195 colors = { colors }
0 commit comments