fix: remove page title hook (#7583)
* fix: page title hook removed * fix: build errors
This commit is contained in:
parent
d692db47b2
commit
4b06bc4d2d
4 changed files with 6 additions and 17 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { useHead } from "@plane/ui";
|
||||
import { useEffect } from "react";
|
||||
|
||||
type PageHeadTitleProps = {
|
||||
title?: string;
|
||||
|
|
@ -8,7 +8,11 @@ type PageHeadTitleProps = {
|
|||
export const PageHead: React.FC<PageHeadTitleProps> = (props) => {
|
||||
const { title } = props;
|
||||
|
||||
useHead({ title });
|
||||
useEffect(() => {
|
||||
if (title) {
|
||||
document.title = title ?? "Plane | Simple, extensible, open-source project management tool.";
|
||||
}
|
||||
}, [title]);
|
||||
|
||||
return null;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
export * from "./use-page-title";
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
import { useEffect } from "react";
|
||||
|
||||
interface IUseHeadParams {
|
||||
title?: string;
|
||||
}
|
||||
|
||||
export const useHead = ({ title }: IUseHeadParams) => {
|
||||
useEffect(() => {
|
||||
if (title) {
|
||||
document.title = title ?? "Plane | Simple, extensible, open-source project management tool.";
|
||||
}
|
||||
}, [title]);
|
||||
};
|
||||
|
|
@ -17,7 +17,6 @@ export * from "./emoji";
|
|||
export * from "./favorite-star";
|
||||
export * from "./form-fields";
|
||||
export * from "./header";
|
||||
export * from "./hooks";
|
||||
export * from "./icons";
|
||||
export * from "./link";
|
||||
export * from "./loader";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue