diff options
author | crupest <crupest@outlook.com> | 2023-09-21 23:49:12 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2023-09-21 23:49:12 +0800 |
commit | d477c7270c90b190ed82b13f48f39a05d83503d2 (patch) | |
tree | 572f74b2adc75247b9d1c9a8965e3de2559d4160 /FrontEnd/src/pages/setting/index.tsx | |
parent | a8a8385cd959e4d9d57b8a35381d2851049c07ff (diff) | |
download | timeline-d477c7270c90b190ed82b13f48f39a05d83503d2.tar.gz timeline-d477c7270c90b190ed82b13f48f39a05d83503d2.tar.bz2 timeline-d477c7270c90b190ed82b13f48f39a05d83503d2.zip |
Fix #1394.
Diffstat (limited to 'FrontEnd/src/pages/setting/index.tsx')
-rw-r--r-- | FrontEnd/src/pages/setting/index.tsx | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/FrontEnd/src/pages/setting/index.tsx b/FrontEnd/src/pages/setting/index.tsx index 3fb18e24..70df1b32 100644 --- a/FrontEnd/src/pages/setting/index.tsx +++ b/FrontEnd/src/pages/setting/index.tsx @@ -11,8 +11,7 @@ import classNames from "classnames"; import { useUser, userService } from "~src/services/user"; import { getHttpUserClient } from "~src/http/user"; -import { useC, Text } from "~src/common"; - +import { useC, I18nText } from "~src/components/common"; import { pushAlert } from "~src/components/alert"; import { useDialog, ConfirmDialog } from "~src/components/dialog"; import Card from "~src/components/Card"; @@ -27,7 +26,7 @@ import "./index.css"; interface SettingSectionProps extends Omit<ComponentPropsWithoutRef<typeof Card>, "title"> { - title: Text; + title: I18nText; children?: ReactNode; } @@ -49,8 +48,8 @@ function SettingSection({ interface SettingItemContainerProps extends Omit<ComponentPropsWithoutRef<"div">, "title"> { - title: Text; - description?: Text; + title: I18nText; + description?: I18nText; danger?: boolean; extraClassName?: string; } @@ -78,7 +77,9 @@ function SettingItemContainer({ > <div className="setting-item-label-area"> <div className="setting-item-label-title">{c(title)}</div> - <small className="setting-item-label-sub">{c(description)}</small> + {description && ( + <small className="setting-item-label-sub">{c(description)}</small> + )} </div> <div className="setting-item-value-area">{children}</div> </div> @@ -97,7 +98,7 @@ interface SelectSettingItemProps extends Omit<SettingItemContainerProps, "onSelect" | "extraClassName"> { options: { value: string; - label: Text; + label: I18nText; }[]; value?: string | null; onSelect: (value: string) => void; |