1
Fork 0
mirror of https://github.com/Steffo99/sophon.git synced 2024-12-23 15:24:21 +00:00
sophon/frontend/src/hooks/useAsDocumentTitle.ts

10 lines
198 B
TypeScript

import * as React from "react";
export function useAsDocumentTitle(title: string): void {
React.useEffect(
() => {
document.title = title
},
[title]
)
}