feat: migrate ui components to i18n

This commit is contained in:
2024-01-29 13:38:22 +07:00
parent 698bd78684
commit cfda9ba899
16 changed files with 122 additions and 124 deletions

View File

@@ -10,6 +10,7 @@ import {
import { NDKCacheUserProfile } from "@lume/types";
import { cn } from "@lume/utils";
import { useTranslation } from "react-i18next";
type MentionListRef = {
onKeyDown: (props: { event: Event }) => boolean;
@@ -22,6 +23,7 @@ const List = (
},
ref: Ref<unknown>,
) => {
const [t] = useTranslation();
const [selectedIndex, setSelectedIndex] = useState(0);
const selectItem = (index) => {
@@ -107,7 +109,9 @@ const List = (
</button>
))
) : (
<div className="text-center text-sm font-medium">No result</div>
<div className="text-center text-sm font-medium">
{t("global.noResult")}
</div>
)}
</div>
);