From 4088245977b91bcf3dbdd2c0acca5dc469d75aa9 Mon Sep 17 00:00:00 2001 From: Ildar Nurislamov Date: Mon, 27 Jan 2025 11:33:48 +0400 Subject: [PATCH] console - add workspace name to web page title --- webapps/console/pages/_app.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/webapps/console/pages/_app.tsx b/webapps/console/pages/_app.tsx index a36920a3c..32136df41 100644 --- a/webapps/console/pages/_app.tsx +++ b/webapps/console/pages/_app.tsx @@ -450,8 +450,12 @@ const WorkspaceLoader: React.FC< analytics.page("Workspace Page", { context: { workspaceId: workspace.id, groupId: workspace.id }, }); + const newTitle = `Jitsu - ${workspace.name}`; + if (document.title !== newTitle) { + document.title = newTitle; + } } - }, [analytics, router.asPath, workspace?.id]); + }, [analytics, router.asPath, workspace?.id, workspace?.name]); /* eslint-disable react-hooks/exhaustive-deps */ //user may be a new object on each render while being the same user