diff --git a/src/app/share/page.tsx b/src/app/share/page.tsx index 6a2c8b5..7a1de32 100644 --- a/src/app/share/page.tsx +++ b/src/app/share/page.tsx @@ -134,15 +134,24 @@ function UploadsPage() { ); } + //set page title and description + const pageTitle = `File Details - ${fileDetails.name}`; + const pageDescription = `Details of the file: ${fileDetails.name}`; + useEffect(() => { + document.title = pageTitle; + const metaDescription = document.querySelector('meta[name="description"]'); + if (metaDescription) { + metaDescription.setAttribute("content", pageDescription); + } + const metaTitle = document.querySelector('meta[name="title"]'); + if (metaTitle) { + metaTitle.setAttribute("content", pageTitle); + } + + }, [pageTitle]); + return (
- - - - - - -