From 098f9d7c0d127330f0d2f6703b7144f3f496a97f Mon Sep 17 00:00:00 2001 From: rustlab1 <58003304+rustlab1@users.noreply.github.com> Date: Wed, 15 Oct 2025 13:31:20 -0700 Subject: [PATCH] change author url --- app/author/[id]/page.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/author/[id]/page.tsx b/app/author/[id]/page.tsx index 5b29b5957..a6fcbea02 100644 --- a/app/author/[id]/page.tsx +++ b/app/author/[id]/page.tsx @@ -1,6 +1,6 @@ 'use client'; -import { use, useTransition } from 'react'; +import { use, useTransition, useEffect } from 'react'; import { useAuthorAchievements, useAuthorInfo, useAuthorSummaryStats } from '@/hooks/useAuthor'; import { useUser } from '@/contexts/UserContext'; import { Card } from '@/components/ui/Card'; @@ -246,6 +246,13 @@ export default function AuthorProfilePage({ params }: { params: Promise<{ id: st const [{ summaryStats, isLoading: isSummaryStatsLoading, error: summaryStatsError }] = useAuthorSummaryStats(authorId); + // Update document title when author data is loaded + useEffect(() => { + if (user?.authorProfile?.fullName) { + document.title = `${user.authorProfile.fullName} | ResearchHub`; + } + }, [user?.authorProfile?.fullName]); + if (isLoading || isUserLoading) { return ( <>