Skip to content

Commit

Permalink
Chore: 복구
Browse files Browse the repository at this point in the history
  • Loading branch information
y-solb committed Jul 6, 2024
1 parent 384cd40 commit 93948b1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
11 changes: 5 additions & 6 deletions src/app/(portfolio)/[username]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
import Portfolio from '@/containers/portfolio/Portfolio'
// import { fetchPortfolio } from '@/fetch/fetchPortfolio'
import { fetchPortfolio } from '@/fetch/fetchPortfolio'
import { removeTagsText } from '@/lib/utils'
import { Metadata } from 'next'
// import { notFound } from 'next/navigation'
import { notFound } from 'next/navigation'

type Props = {
params: { username: string }
}

export async function generateMetadata({ params }: Props): Promise<Metadata> {
const { username } = params
const portfolio = {
thumbnail: '',
displayName: 'displayName',
shortBio: 'shortBio',
const portfolio = await fetchPortfolio(username)
if (!portfolio) {
return notFound()
}

const title = removeTagsText(portfolio?.displayName)
Expand Down
6 changes: 1 addition & 5 deletions src/fetch/fetchPortfolio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,5 @@ export const fetchPortfolio = async (
if (res.status !== 200) {
return null
}
return {
thumbnail: '',
displayName: 'displayName',
shortBio: 'shortBio',
}
return res.json()
}

0 comments on commit 93948b1

Please sign in to comment.