fix: page title refresh (#4186)

* fix: ts

* update jieba package

* fix: page title refresh
This commit is contained in:
Archer
2025-03-17 10:53:38 +08:00
committed by GitHub
parent e3eb05beed
commit ad26d9271d
3 changed files with 27 additions and 17 deletions

View File

@@ -1,6 +1,6 @@
import { LOGO_ICON } from '@fastgpt/global/common/system/constants';
import Head from 'next/head';
import React, { useEffect, useMemo } from 'react';
import React, { useMemo } from 'react';
const NextHead = ({ title, icon, desc }: { title?: string; icon?: string; desc?: string }) => {
const formatIcon = useMemo(() => {
@@ -11,13 +11,6 @@ const NextHead = ({ title, icon, desc }: { title?: string; icon?: string; desc?:
return LOGO_ICON;
}, [icon]);
useEffect(() => {
// Force update document title
if (title) {
document.title = title;
}
}, [title]);
return (
<Head>
<title>{title}</title>