perf: multi language

This commit is contained in:
Junyan Qin
2025-05-15 10:40:36 +08:00
parent a9f4dc517a
commit 347da6142e
12 changed files with 80 additions and 24 deletions
+5 -1
View File
@@ -5,6 +5,7 @@ import HomeSidebar from '@/app/home/components/home-sidebar/HomeSidebar';
import HomeTitleBar from '@/app/home/components/home-titlebar/HomeTitleBar';
import React, { useState } from 'react';
import { SidebarChildVO } from '@/app/home/components/home-sidebar/HomeSidebarChild';
import { I18nText } from '@/app/infra/entities/api';
export default function HomeLayout({
children,
@@ -13,7 +14,10 @@ export default function HomeLayout({
}>) {
const [title, setTitle] = useState<string>('');
const [subtitle, setSubtitle] = useState<string>('');
const [helpLink, setHelpLink] = useState<string>('');
const [helpLink, setHelpLink] = useState<I18nText>({
en_US: '',
zh_Hans: '',
});
const onSelectedChangeAction = (child: SidebarChildVO) => {
setTitle(child.name);
setSubtitle(child.description);