Update from Vibe Studio

This commit is contained in:
Vibe Studio
2026-01-09 14:52:46 +00:00
parent 42a0efe70b
commit 47fa6d98b2
28661 changed files with 2421771 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
export declare function useDocumentTitle(titleInfo: {
title: string;
id: string;
pageName: string;
}, appDefaultTitle: string | false): void;

View File

@@ -0,0 +1,10 @@
import { useEffect } from 'react';
import { isBrowser } from "../../isBrowser";
export function useDocumentTitle(titleInfo, appDefaultTitle) {
var titleText = typeof titleInfo.pageName === 'string' ? titleInfo.title : appDefaultTitle;
useEffect(function () {
if (isBrowser() && titleText) {
document.title = titleText;
}
}, [titleInfo.title, titleText]);
}