-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
12 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,20 @@ | ||
import API_ENDPOINTS from '@/constants/apiEndpoints' | ||
// import API_ENDPOINTS from '@/constants/apiEndpoints' | ||
|
||
type PortfolioData = { | ||
thumbnail: string | ||
displayName: string | ||
shortBio: string | ||
} | ||
|
||
export const fetchPortfolio = async ( | ||
username: string, | ||
): Promise<PortfolioData | null> => { | ||
const res = await fetch( | ||
`${process.env.NEXT_PUBLIC_API_HOST}${API_ENDPOINTS.PORTFOLIO.METADATA(username)}`, | ||
{ cache: 'no-store' }, | ||
) | ||
|
||
if (res.status !== 200) { | ||
return null | ||
} | ||
return res.json() | ||
export const fetchPortfolio = async () // username: string, | ||
: Promise<PortfolioData | null> => { | ||
return null | ||
// const res = await fetch( | ||
// `${process.env.NEXT_PUBLIC_API_HOST}${API_ENDPOINTS.PORTFOLIO.METADATA(username)}`, | ||
// { cache: 'no-store' }, | ||
// ) | ||
// if (res.status !== 200) { | ||
// return null | ||
// } | ||
// return res.json() | ||
} |