Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 4232 Rev 4701
Línea 2... Línea 2...
2
import axios from '../../utils/axios'
2
import axios from '../../utils/axios'
3
import { useDispatch } from 'react-redux'
3
import { useDispatch } from 'react-redux'
4
import { addNotification } from '../../redux/notification/notification.actions'
4
import { addNotification } from '../../redux/notification/notification.actions'
Línea 5... Línea 5...
5
 
5
 
6
const EventsList = () => {
-
 
7
 
6
const EventsList = () => {
-
 
7
    const [events, setEvents] = useState([])
-
 
8
    const typeLabels = {
-
 
9
        event: 'Evento',
-
 
10
        task: 'Tarea',
-
 
11
 
8
    const [events, setEvents] = useState([])
12
    }
Línea 9... Línea 13...
9
    const dispatch = useDispatch()
13
    const dispatch = useDispatch()
10
 
14
 
11
    const getEvents = async () => {
15
    const getEvents = async () => {
Línea 12... Línea 16...
12
        try {
16
        try {
13
            const { data: response } = await axios.get('/helpers/next-events')
17
            const { data: response } = await axios.get('/calendar/events')
14
 
18
 
15
            if (!response.success) {
19
            if (!response.success) {
Línea 26... Línea 30...
26
 
30
 
27
    useEffect(() => {
31
    useEffect(() => {
28
        getEvents()
32
        getEvents()
Línea -... Línea 33...
-
 
33
    }, [])
-
 
34
 
29
    }, [])
35
 
30
 
36
 
31
    return (
37
    return (
32
        <div className='peopleYouMayKnow'>
38
        <div className='peopleYouMayKnow'>
33
            <div className="sd-title d-flex align-items-center justify-content-between">
39
            <div className="sd-title d-flex align-items-center justify-content-between">
Línea 47... Línea 53...
47
                                rel="noreferrer"
53
                                rel="noreferrer"
48
                                style={{ color: event.textColor, background: event.backgroundColor, }}
54
                                style={{ color: event.textColor, background: event.backgroundColor, }}
49
                            >
55
                            >
50
                                <div className='calendar-event'>
56
                                <div className='calendar-event'>
51
                                    <h4>
57
                                    <h4>
52
                                        <b>Evento: </b> {event.title}
58
                                        <b>{typeLabels[event.type]}: </b> {event.title}
53
                                    </h4>
59
                                    </h4>
54
                                    <span>
60
                                    <span>
55
                                        <b>Inicio: </b>{eventStart}
61
                                        <b>Inicio: </b>{eventStart}
56
                                    </span>
62
                                    </span>
57
                                    <span>
63
                                    <span>