mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-07-23 04:46:07 +00:00
perf: unify i18n text class in frontend
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import styles from './HomeSidebar.module.css';
|
||||
import { I18nText } from '@/app/infra/entities/api';
|
||||
import { I18nLabel } from '@/app/infra/entities/common';
|
||||
|
||||
export interface ISidebarChildVO {
|
||||
id: string;
|
||||
@@ -7,7 +7,7 @@ export interface ISidebarChildVO {
|
||||
name: string;
|
||||
route: string;
|
||||
description: string;
|
||||
helpLink: I18nText;
|
||||
helpLink: I18nLabel;
|
||||
}
|
||||
|
||||
export class SidebarChildVO {
|
||||
@@ -16,7 +16,7 @@ export class SidebarChildVO {
|
||||
name: string;
|
||||
route: string;
|
||||
description: string;
|
||||
helpLink: I18nText;
|
||||
helpLink: I18nLabel;
|
||||
|
||||
constructor(props: ISidebarChildVO) {
|
||||
this.id = props.id;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { i18nObj } from '@/i18n/I18nProvider';
|
||||
import styles from './HomeTittleBar.module.css';
|
||||
import { I18nText } from '@/app/infra/entities/api';
|
||||
import { I18nLabel } from '@/app/infra/entities/common';
|
||||
|
||||
export default function HomeTitleBar({
|
||||
title,
|
||||
@@ -9,7 +9,7 @@ export default function HomeTitleBar({
|
||||
}: {
|
||||
title: string;
|
||||
subtitle: string;
|
||||
helpLink: I18nText;
|
||||
helpLink: I18nLabel;
|
||||
}) {
|
||||
return (
|
||||
<div className={`${styles.titleBarContainer}`}>
|
||||
|
||||
@@ -5,7 +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';
|
||||
import { I18nLabel } from '@/app/infra/entities/common';
|
||||
|
||||
export default function HomeLayout({
|
||||
children,
|
||||
@@ -14,7 +14,7 @@ export default function HomeLayout({
|
||||
}>) {
|
||||
const [title, setTitle] = useState<string>('');
|
||||
const [subtitle, setSubtitle] = useState<string>('');
|
||||
const [helpLink, setHelpLink] = useState<I18nText>({
|
||||
const [helpLink, setHelpLink] = useState<I18nLabel>({
|
||||
en_US: '',
|
||||
zh_Hans: '',
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user