feat(web): update document title
This commit is contained in:
@@ -2,11 +2,12 @@
|
||||
* @Author: ZhaoYing
|
||||
* @Date: 2026-02-03 16:29:37
|
||||
* @Last Modified by: ZhaoYing
|
||||
* @Last Modified time: 2026-03-26 15:37:18
|
||||
* @Last Modified time: 2026-04-14 10:01:05
|
||||
*/
|
||||
import React, { useEffect, useState, useRef } from 'react';
|
||||
import { useParams } from 'react-router-dom';
|
||||
import { Flex } from 'antd'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
|
||||
import ConfigHeader from './components/ConfigHeader'
|
||||
import type { AgentRef, ClusterRef, WorkflowRef, Config } from './types'
|
||||
@@ -30,6 +31,7 @@ import Logs from './Logs';
|
||||
const ApplicationConfig: React.FC = () => {
|
||||
// Hooks
|
||||
const { id, source } = useParams();
|
||||
const { t } = useTranslation()
|
||||
|
||||
// Refs for different application types
|
||||
const agentRef = useRef<AgentRef>(null)
|
||||
@@ -95,6 +97,13 @@ const ApplicationConfig: React.FC = () => {
|
||||
getApplicationInfo()
|
||||
}, [id])
|
||||
|
||||
useEffect(() => {
|
||||
if (application?.name) {
|
||||
const appName = t('memoryBear');
|
||||
document.title = `${application.name} - ${appName}`;
|
||||
}
|
||||
}, [application?.name])
|
||||
|
||||
/**
|
||||
* Fetch application information
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user