feat: add wishlist
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
interface LinkValue {
|
||||
value: string | null
|
||||
}
|
||||
|
||||
export interface DiaryBookRow {
|
||||
id: number
|
||||
title: string | null
|
||||
title_german: string | null
|
||||
authors: LinkValue[]
|
||||
read_date: string | null
|
||||
}
|
||||
|
||||
export function toDiaryBook(row: DiaryBookRow): DiaryBook {
|
||||
const original = (row.title ?? '').trim()
|
||||
return {
|
||||
id: row.id,
|
||||
title: row.title_german?.trim() || original,
|
||||
originalTitle: original,
|
||||
authors: lookupValues(row.authors),
|
||||
readDate: row.read_date || null
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user