mirror of
https://github.com/Tria-plc/emaui.git
synced 2026-08-27 19:00:56 +00:00
14 lines
372 B
JavaScript
14 lines
372 B
JavaScript
'use client';
|
|
import { useIsomorphicEffect } from '../use-isomorphic-effect/use-isomorphic-effect.mjs';
|
|
|
|
function useDocumentTitle(title) {
|
|
useIsomorphicEffect(() => {
|
|
if (typeof title === "string" && title.trim().length > 0) {
|
|
document.title = title.trim();
|
|
}
|
|
}, [title]);
|
|
}
|
|
|
|
export { useDocumentTitle };
|
|
//# sourceMappingURL=use-document-title.mjs.map
|