From 56704da4ce9ba1746ca55adc7972274d6e007e49 Mon Sep 17 00:00:00 2001 From: Arjun Patel Date: Sun, 16 Jan 2022 00:54:43 -0800 Subject: [PATCH] update doc title based on the team --- pages/teams/[teamid].tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pages/teams/[teamid].tsx b/pages/teams/[teamid].tsx index 429e1c5..15e7f28 100644 --- a/pages/teams/[teamid].tsx +++ b/pages/teams/[teamid].tsx @@ -54,6 +54,10 @@ function TeamDashboard() { }; useEffect(() => { + // set the document title based on the team + // todo: update based on who sent you a message + document.title = teamDashboardContext.team.name; + window.addEventListener("focus", onFocus); window.addEventListener("blur", onBlur); // Calls onFocus when the window first loads