diff --git a/public/locales/en/member.json b/public/locales/en/member.json index 7d221c48..cdf4402e 100644 --- a/public/locales/en/member.json +++ b/public/locales/en/member.json @@ -28,5 +28,7 @@ "search_not_found": "Not found, or this user is not allowed to be searched.", "search_by_id": "Search by ID", - "search_by_email": "Search by Email" + "search_by_id_ph": "Input user ID", + "search_by_email": "Search by Email", + "search_by_email_ph": "Input user email" } diff --git a/public/locales/zh/member.json b/public/locales/zh/member.json index da4877b5..fc8c0a10 100644 --- a/public/locales/zh/member.json +++ b/public/locales/zh/member.json @@ -27,5 +27,7 @@ "search_not_found": "用户不存在,或者不允许搜索", "search_by_id": "用户ID", - "search_by_email": "用户邮箱" + "search_by_id_ph": "请输入用户ID", + "search_by_email": "用户邮箱", + "search_by_email_ph": "请输入用户邮箱" } diff --git a/src/components/SearchUser.tsx b/src/components/SearchUser.tsx index 6f8b5901..6fa7fb40 100644 --- a/src/components/SearchUser.tsx +++ b/src/components/SearchUser.tsx @@ -25,7 +25,7 @@ const SearchUser: FC = ({ closeModal }) => { const { t } = useTranslation(); const navigateTo = useNavigate(); const inputRef = useRef(null); - const [type, setType] = useState("id"); + const [type, setType] = useState("email"); const [input, setInput] = useState({ id: "", email: "" @@ -77,18 +77,18 @@ const SearchUser: FC = ({ closeModal }) => {
- - {t("search_by_id", { ns: "member" })} - {t("search_by_email", { ns: "member" })} + + {t("search_by_id", { ns: "member" })} +
= ({ closeModal }) => { disabled={isLoading} prefix={} value={input[type]} - placeholder={`${t("action.search")}...`} + placeholder={`${ + type == "email" + ? t("search_by_email_ph", { ns: "member" }) + : t("search_by_id_ph", { ns: "member" }) + }...`} onChange={handleInput} />