Projekt

Obecné

Profil

« Předchozí | Další » 

Revize f4af30c8

Přidáno uživatelem Fantič před více než 1 rok

re #10895: ItemView redesign, refactor

Zobrazit rozdíly:

src/stores/actions/itemThunks.ts
16 16
            if (response.status === 200 && response.data.object.length > 1) {
17 17
                // TODO IMAGES to array :-)
18 18
                const authorName = response.data?.object[1]?.name?.[0]?.getty_data?.display_name ?? undefined;
19
                const images : {imageUrl: string, title: string}[] = []
19
                const images : {imageUrl: string, title: string, relationship_type: string, cert: Certainty}[] = []
20 20
                for(let i = 1; i < response.data.object.length; i++){
21
                    images.push({imageUrl: response.data.object[i]?.images?.[0]?.file, title:  response.data.object[i]?.images?.[0]?.text})
21
                    images.push({imageUrl: response.data.object[i]?.images?.[0]?.file ?? "", title:  response.data.object[i]?.images?.[0]?.text ?? "", relationship_type: response.data.object[i].relationship_type ?? "", cert: response.data.object[i].cert ?? Certainty.Unknown })
22 22
                }
23 23
                
24 24
                const institution = {
......
44 44
                    searchSubjects: response.data.search_subject ?? undefined,
45 45
                    prevItem: response.data.prevItem ?? undefined,
46 46
                    nextItem: response.data.nextItem ?? undefined,
47
                    room: response.data.room ?? undefined,
47 48
                    authorName,
48 49
                    images,
49 50
                    institution,
......
67 68
                    nextItem: response.data.nextItem ?? undefined,
68 69
                    inventoryItem: response.data.text ?? undefined,
69 70
                    searchSubjects: response.data.search_subject ?? undefined,
71
                    room: response.data.room ?? undefined,
70 72
                }
71 73
            }
72 74
            else {

Také k dispozici: Unified diff