MCPcopy Create free account
hub / github.com/0010aor/FlashNotes / fetchCard

Function fetchCard

frontend/src/hooks/useCard.ts:36–51  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 1

useCardFunction · 0.85

Calls 3

getCardByIdFunction · 0.90
tFunction · 0.85
createMethod · 0.65

Tested by

no test coverage detected