From 3794a926b58680480d13c96fedbff44f3706ecd1 Mon Sep 17 00:00:00 2001 From: Roman Timashev Date: Tue, 6 Sep 2022 13:46:56 +0300 Subject: [PATCH] rm requestGet --- src/next-lib.ts | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/next-lib.ts b/src/next-lib.ts index 22873813..f90beced 100644 --- a/src/next-lib.ts +++ b/src/next-lib.ts @@ -1,4 +1,3 @@ -import axios from 'axios' import { NextPageContext } from 'next' export interface IResponseItems { @@ -7,16 +6,6 @@ export interface IResponseItems { prevPage: number } -export async function requestGet(url: string, defaultResponse: T): Promise { - try { - const res = await axios.get(url) - - return res.data - } catch (e) { - return defaultResponse - } -} - /** * This wrapper prevents fetching api request in static export mode and production environment * because nextjs call getInitialProps on the client side