Skip to content

Commit

Permalink
fix: 코드리뷰 반영
Browse files Browse the repository at this point in the history
  • Loading branch information
haejinyun committed Nov 28, 2024
1 parent abfde3b commit 1ea9cd2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion src/app/basicauction/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@ interface GenerateMetadataProps {
export const generateMetadata = async ({
searchParams,
}: GenerateMetadataProps): Promise<Metadata> => {
const queryValue = searchParams.categoryId || 'ALL';
const queryValue = searchParams.categoryId;
if (!queryValue) {
return getMetadata({
title: 'ALL',
asPath: '/basicauction?page=1',
});
}
const categoryListTree = await fetch(
`${process.env.NEXT_PUBLIC_SERVER_API_URL}/api/v2/categories/${queryValue}`,
)
Expand All @@ -31,6 +37,7 @@ export const generateMetadata = async ({

return getMetadata({
title: `${categoryName}`,
asPath: `/basicauction?categoryId=${queryValue}&page=1`,
// TODO 예쁜 사진이 있다면 그것으로 카테고리를 나타내서 openGraphImage를 설정하면 좋을 듯함.
});
};
Expand Down
2 changes: 1 addition & 1 deletion src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default async function RootLayout({
]);

return (
<html lang="en" className={roboto.className}>
<html lang="ko" className={roboto.className}>
<Head>
<meta httpEquiv="Content-Security-Policy" content="upgrade-insecure-requests" />
</Head>
Expand Down

0 comments on commit 1ea9cd2

Please sign in to comment.