fix: 修正例句圖片映射邏輯,正確顯示新增按鈕

- 修改imageMap只保留真正有圖片的詞彙(evidence)
- warrants和recovering現在會顯示「新增例句圖」按鈕
- 修復所有詞卡都顯示mock圖片的問題
- 為AI生成流程提供正確的入口點

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
鄭沛軒 2025-09-24 17:08:23 +08:00
parent acd20e3f2c
commit ecbc5f7d09
1 changed files with 2 additions and 4 deletions

View File

@ -25,12 +25,10 @@ function FlashcardsContent() {
// 例句圖片邏輯
const getExampleImage = (word: string): string | null => {
// 只列出真正有例句圖片的詞彙
const imageMap: {[key: string]: string} = {
'brought': '/images/examples/bring_up.png',
'instincts': '/images/examples/instinct.png',
'warrants': '/images/examples/warrant.png',
'evidence': '/images/examples/bring_up.png',
'recovering': '/images/examples/instinct.png'
// warrants 和 recovering 暫時移除,將顯示新增按鈕
}
// 只返回已確認存在的圖片,沒有則返回 null