()
| 34 | } |
| 35 | |
| 36 | const fetchCard = async () => { |
| 37 | try { |
| 38 | const data = await getCardById(collectionId, cardId) |
| 39 | if (data) { |
| 40 | setCard(data) |
| 41 | setOriginalCard(data) |
| 42 | } |
| 43 | } catch (error) { |
| 44 | toaster.create({ |
| 45 | title: t('general.errors.errorLoadingCard'), |
| 46 | type: 'error', |
| 47 | }) |
| 48 | } finally { |
| 49 | setIsLoading(false) |
| 50 | } |
| 51 | } |
| 52 | fetchCard() |
| 53 | }, [cardId, collectionId, t]) |
| 54 |
no test coverage detected