File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
packages/web/src/app/[domain]/browse/[...path] Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -7,22 +7,23 @@ import { Metadata } from "next";
77import { parsePathForTitle } from "@/lib/utils" ;
88
99type 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 (
You can’t perform that action at this time.
0 commit comments