rm requestGet

This commit is contained in:
tmshv committed 2022-09-06 13:46:56 +03:00
1 parent ecb81f756a
commit 3794a926b5
1 file changed
-11
-11
View File
@@ -1,4 +1,3 @@
import axios from 'axios'
import { NextPageContext } from 'next'
export interface IResponseItems<T> {
@@ -7,16 +6,6 @@ export interface IResponseItems<T> {
prevPage: number
}
export async function requestGet<T>(url: string, defaultResponse: T): Promise<T> {
try {
const res = await axios.get<T>(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