Skip to content

Commit af915f7

Browse files
committed
fix: remove left-over console logs and Async Params resolution.
1 parent c4d4dda commit af915f7

File tree

1 file changed

+5
-5
lines changed
  • packages/web/src/app/[domain]/browse/[...path]

1 file changed

+5
-5
lines changed

packages/web/src/app/[domain]/browse/[...path]/page.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,23 @@ import { Metadata } from "next";
77
import { parsePathForTitle} from "@/lib/utils";
88

99
type Props = {
10-
params: {
10+
params: Promise<{
1111
domain: string;
1212
path: string[];
13-
};
13+
}>;
1414
};
1515

16-
export async function generateMetadata({ params }: Props): Promise<Metadata> {
16+
export async function generateMetadata({ params: paramsPromise }: Props): Promise<Metadata> {
1717
let title = 'Browse'; // Default Fallback
1818

1919
try {
20+
const params = await paramsPromise;
2021
title = parsePathForTitle(params.path);
2122

2223
} catch (error) {
2324
// TODO: Maybe I need to look into a better way of handling this error.
2425
// for now, it is just a log, fallback tab title and prevents the app from crashing.
25-
console.error("Failed to generate metadata title from path:", params.path, error);
26+
console.error("Failed to generate metadata title from path:", error);
2627
}
2728

2829
return {
@@ -44,7 +45,6 @@ export default async function BrowsePage(props: BrowsePageProps) {
4445
} = params;
4546

4647
const rawPath = _rawPath.join('/');
47-
console.log("rawPath:", rawPath);
4848
const { repoName, revisionName, path, pathType } = getBrowseParamsFromPathParam(rawPath);
4949

5050
return (

0 commit comments

Comments
 (0)