Skip to content

Commit

Permalink
SOROKA-COVER-FIX: get card (#50)
Browse files Browse the repository at this point in the history
* SOROKA-COVER-FIX: get card

* SOROKA-COVERS-FIX: delete unused import
  • Loading branch information
AlexRbkv authored Dec 4, 2022
1 parent 647ce3f commit 19794d1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/dashboard/ListCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ const ListCard = ({ id, name, isFilled = true, cover = null }: ListCardProps) =>
let cardCover = ''
if (cover) {
try {
const fileJSON = JSON.parse(cover)
cardCover = fileJSON.url
const { id: fileId, name: fileName } = JSON.parse(cover)
cardCover = `https://soroka.f128.science/restapi/v1/files/by-id/${fileId}/${fileName}`
// cardCover = fileJSON.url
} catch (e) {
console.warn('There is a problem with cover:', cover)
}
Expand Down

0 comments on commit 19794d1

Please sign in to comment.