feat: paginate/search words and improve review flow

This commit is contained in:
2026-02-27 13:15:37 +08:00
parent 906c5c37ba
commit a62c2a3aa1
6 changed files with 116 additions and 28 deletions

View File

@@ -6,7 +6,7 @@ export async function addWord(word: string) {
return res.data
}
export async function getWords(params: { limit?: number; offset?: number } = {}) {
export async function getWords(params: { limit?: number; offset?: number; q?: string } = {}) {
const res = await http.get<{ data: Word[]; total: number }>('/words', { params })
return res.data
}