new axio req

This commit is contained in:
VividTruthKeeper 2022-08-06 01:57:28 +05:00
parent cecba10992
commit d811c9ccb1
1 changed files with 10 additions and 0 deletions

View File

@ -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();
};