Files
learn-languages/src/app/(features)/dictionary/DictionaryEntry.tsx
goddonebianu 020744b353 fix(i18n): 补充页面缺失的中英文翻译并修复登录重定向循环
- 补充 login/signup/dictionary/srt-player/alphabet 页面的翻译
- 修复登录页面邮箱登录时 password 参数错误
- 修复登录/注册页面的无限重定向循环问题
- 调整登录/注册卡片宽度为 w-96
2026-03-09 18:41:41 +08:00

46 lines
1.4 KiB
TypeScript

import { TSharedEntry } from "@/shared/dictionary-type";
import { useTranslations } from "next-intl";
interface DictionaryEntryProps {
entry: TSharedEntry;
}
export function DictionaryEntry({ entry }: DictionaryEntryProps) {
const t = useTranslations("dictionary");
return (
<div>
<div className="flex items-center gap-3 mb-3">
{entry.ipa && (
<span className="text-gray-600 text-lg">
[{entry.ipa}]
</span>
)}
{entry.partOfSpeech && (
<span className="px-3 py-1 bg-[#35786f] text-white text-sm rounded-full">
{entry.partOfSpeech}
</span>
)}
</div>
<div className="mb-3">
<h3 className="text-sm font-semibold text-gray-700 mb-1">
{t("definition")}
</h3>
<p className="text-gray-800">{entry.definition}</p>
</div>
{entry.example && (
<div>
<h3 className="text-sm font-semibold text-gray-700 mb-1">
{t("example")}
</h3>
<p className="text-gray-700 pl-4 border-l-4 border-[#35786f]">
{entry.example}
</p>
</div>
)}
</div>
);
}