mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-04-17 02:35:27 -05:00
10 lines
291 B
TypeScript
10 lines
291 B
TypeScript
import { useEffect } from "react";
|
|
import { makeTitle } from "~/utils/strings";
|
|
|
|
/** Set title on mount. Used for showing a translated title on pages without loader. */
|
|
export function useSetTitle(title: string) {
|
|
useEffect(() => {
|
|
document.title = makeTitle(title);
|
|
}, [title]);
|
|
}
|