Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion packages/ui/src/hooks/use-page-title.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { useEffect } from "react";
import { SITE_TITLE } from "@plane/constants";

interface IUseHeadParams {
title?: string;
Expand All @@ -7,7 +8,9 @@ interface IUseHeadParams {
export const useHead = ({ title }: IUseHeadParams) => {
useEffect(() => {
if (title) {
document.title = title ?? "Plane | Simple, extensible, open-source project management tool.";
document.title = title;
} else {
document.title = SITE_TITLE;
}
}, [title]);
};
3 changes: 2 additions & 1 deletion web/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ import "@/styles/react-day-picker.css";
// meta data info

import { SITE_DESCRIPTION, SITE_NAME } from "@plane/constants";
import { PageHead } from "@/components/core";
// helpers
import { API_BASE_URL, cn } from "@/helpers/common.helper";
// local
import { AppProvider } from "./provider";

export const metadata: Metadata = {
title: "Plane | Simple, extensible, open-source project management tool.",
description: SITE_DESCRIPTION,
openGraph: {
title: "Plane | Simple, extensible, open-source project management tool.",
Expand Down Expand Up @@ -74,6 +74,7 @@ export default function RootLayout({ children }: { children: React.ReactNode })
</head>
<body>
<div id="context-menu-portal" />
<PageHead />
<AppProvider>
<div
className={cn(
Expand Down
2 changes: 2 additions & 0 deletions web/core/components/core/page-title.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"use client";

import { useHead } from "@plane/ui";

type PageHeadTitleProps = {
Expand Down