We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3297d84 commit 258353dCopy full SHA for 258353d
website/src/hooks/useDocumentTitle.ts
@@ -1,7 +1,7 @@
1
import { useEffect } from 'react';
2
3
/**
4
- * Update the document title dynamically based on hash and title
+ * Update the document title dynamically based on hash and title.
5
*/
6
export const useDocumentTitle = (title: string) => {
7
useEffect(() => {
@@ -48,6 +48,9 @@ type UseDocumentTitleProps = {
48
children: string;
49
};
50
51
+/**
52
+ * Wrapper component, since MDX file can't import hooks directly.
53
+ */
54
export const UseDocumentTitle = ({ children }: UseDocumentTitleProps) => {
55
useDocumentTitle(children);
56
0 commit comments