mirror of https://github.com/ctk-hq/ctk
feat: created `useTitle` hook
parent
376dae3edb
commit
a8607588a1
@ -0,0 +1 @@
|
||||
export * from "./useTitle";
|
||||
@ -0,0 +1,7 @@
|
||||
import { useEffect } from "react";
|
||||
|
||||
export const useTitle = (title: string) => {
|
||||
useEffect(() => {
|
||||
document.title = title;
|
||||
}, [title]);
|
||||
};
|
||||
Loading…
Reference in New Issue