Skip to content

Commit 6c7b060

Browse files
committed
[dashboard] update document title on setup
1 parent aae1d67 commit 6c7b060

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

components/dashboard/src/dedicated-setup/DedicatedSetup.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,13 @@ import { UserContext } from "../user-context";
2121
import { OIDCClientConfig } from "@gitpod/public-api/lib/gitpod/experimental/v1/oidc_pb";
2222
import { useQueryParams } from "../hooks/use-query-params";
2323
import { forceDedicatedSetupParam } from "./use-check-dedicated-setup";
24+
import { useDocumentTitle } from "../hooks/use-document-title";
2425

2526
type Props = {
2627
onComplete: () => void;
2728
};
2829
const DedicatedSetup: FC<Props> = ({ onComplete }) => {
30+
useDocumentTitle("Welcome - Gitpod");
2931
const currentOrg = useCurrentOrg();
3032
const oidcClients = useOIDCClientsQuery();
3133

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/**
2+
* Copyright (c) 2023 Gitpod GmbH. All rights reserved.
3+
* Licensed under the GNU Affero General Public License (AGPL).
4+
* See License.AGPL.txt in the project root for license information.
5+
*/
6+
7+
import { useEffect } from "react";
8+
9+
export function useDocumentTitle(title?: string) {
10+
useEffect(() => {
11+
if (title && title.length > 0) {
12+
document.title = title;
13+
}
14+
}, [title]);
15+
}

0 commit comments

Comments
 (0)