Add risks
Signed-off-by: Bryan Frimin <bryan@getprobo.com> Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
committed by
Sacha Al Himdani
parent
a2d1310780
commit
a86181c83d
1
packages/hooks/src/index.ts
Normal file
1
packages/hooks/src/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export { usePageTitle } from "./usePageTitle";
|
||||
10
packages/hooks/src/usePageTitle.tsx
Normal file
10
packages/hooks/src/usePageTitle.tsx
Normal file
@@ -0,0 +1,10 @@
|
||||
import { useEffect } from "react";
|
||||
|
||||
export function usePageTitle(title: string) {
|
||||
useEffect(() => {
|
||||
document.title = title + " - Probo";
|
||||
return () => {
|
||||
document.title = "Probo";
|
||||
};
|
||||
}, [title]);
|
||||
}
|
||||
Reference in New Issue
Block a user