From d811c9ccb1887e639dd643f81fea0546056f4ab2 Mon Sep 17 00:00:00 2001 From: VividTruthKeeper Date: Sat, 6 Aug 2022 01:57:28 +0500 Subject: [PATCH] new axio req --- src/helpers/apiRequests.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/helpers/apiRequests.ts b/src/helpers/apiRequests.ts index 800fc2d..d63c682 100644 --- a/src/helpers/apiRequests.ts +++ b/src/helpers/apiRequests.ts @@ -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(); +};