Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 4189 | Ir a la última revisión | | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
4188 stevensc 1
import axios from 'axios'
2
import React from 'react'
3
import { useEffect } from 'react'
4
 
5
const EventsList = () => {
6
 
7
    const getEvents = async () => {
8
        try {
9
            const { data: response } = await axios.get('/helpers/next-events')
10
 
11
            console.log(response)
12
 
13
        } catch (error) {
14
            console.log(error)
15
        }
16
    }
17
    useEffect(() => {
18
        getEvents()
19
    }, [])
20
 
21
    return (
22
        <div>EventsList</div>
23
    )
24
}
25
 
26
export default EventsList