Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 4192 | Rev 4194 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 4192 Rev 4193
Línea 1... Línea 1...
1
import React, { useEffect, useState } from 'react'
1
import React, { useEffect, useState } from 'react'
2
import axios from '../../utils/axios'
2
import axios from '../../utils/axios'
3
import parse from 'html-react-parser'
-
 
4
import { useDispatch } from 'react-redux'
3
import { useDispatch } from 'react-redux'
5
import { addNotification } from '../../redux/notification/notification.actions'
4
import { addNotification } from '../../redux/notification/notification.actions'
Línea 6... Línea 5...
6
 
5
 
Línea 34... Línea 33...
34
            <div className="sd-title d-flex align-items-center justify-content-between">
33
            <div className="sd-title d-flex align-items-center justify-content-between">
35
                <h3>Proximos eventos</h3>
34
                <h3>Proximos eventos</h3>
36
            </div>
35
            </div>
37
            <div className="w-100 d-flex flex-column" style={{ gap: '.5rem' }}>
36
            <div className="w-100 d-flex flex-column" style={{ gap: '.5rem' }}>
38
                {events.length
37
                {events.length
39
                    ? events.map((event) =>
38
                    ? events.map((event) => {
-
 
39
                        const eventStart = new Date(event.start).toLocaleString()
-
 
40
                        const eventEnd = new Date(event.end).toLocaleString()
-
 
41
 
-
 
42
                        return (
40
                        <div className='rounded' key={event.id} style={{ background: event.backgroundColor }}>
43
                            <div className='rounded' key={event.id} style={{ background: event.backgroundColor }}>
41
                            <div className="d-flex align-items-center flex-column" style={{ gap: '.5rem' }}>
44
                                <div className="d-flex align-items-center flex-column" style={{ gap: '.5rem' }}>
-
 
45
                                    <h4 style={{ color: event.textColor }}>{event.title}</h4>
-
 
46
                                    <span style={{ color: event.textColor }}>{`${eventStart} - ${eventEnd}`}</span>
42
                                <h4>{event.title}</h4>
47
                                </div>
43
                                <div className='d-inline-flex align-items-center'>
48
                                <div className="d-flex align-items-center flex-column" style={{ gap: '.5rem' }}>
-
 
49
                                    <a
44
                                    <span>{new Date(event.start).toLocaleString()}</span>
50
                                        className="btn btn-primary"
45
                                    <span>{new Date(event.end).toLocaleString()}</span>
51
                                        href={event.url}
-
 
52
                                    >
-
 
53
                                        Ingresar
-
 
54
                                    </a>
46
                                </div>
55
                                </div>
47
                            </div>
56
                            </div>
48
                            <div className="d-flex align-items-center flex-column" style={{ gap: '.5rem' }}>
-
 
49
                                <a
-
 
50
                                    className="btn btn-primary"
-
 
51
                                    href={event.url}
-
 
52
                                >
-
 
53
                                    Ingresar
-
 
54
                                </a>
-
 
55
                                {parse(event.agenda)}
-
 
56
                            </div>
-
 
57
                        </div>
57
                        )
58
                    )
58
                    })
59
                    : <div className="view-more">No hay eventos</div>
59
                    : <div className="view-more">No hay eventos</div>
60
                }
60
                }
61
            </div>
61
            </div>
62
        </div>
62
        </div>
63
    )
63
    )