new axio req
This commit is contained in:
parent
cecba10992
commit
d811c9ccb1
|
|
@ -16,6 +16,7 @@ import {
|
|||
contacts,
|
||||
about,
|
||||
players,
|
||||
events,
|
||||
} from "../links";
|
||||
import React from "react";
|
||||
|
||||
|
|
@ -132,3 +133,12 @@ export const getTeam = (setState: any) => {
|
|||
})
|
||||
.catch();
|
||||
};
|
||||
|
||||
export const getEvents = (setState: any) => {
|
||||
axios
|
||||
.get(events)
|
||||
.then((res) => {
|
||||
setState(res.data.data);
|
||||
})
|
||||
.catch();
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue