Get Full Card

useCardFullImage

The following environment variables are required:

API_BAAS_CUSTOMER_CARD_IMAGE='/baas/debit-cards/$CARD_ID/image'

How to use?

  • Import useCardFullImage:

import {useCardFullImage} from 'LinkerStudio/modules/baas/common/hooks';
  • Add this code block:

const {
    cardFullImage,
    isLoadingFullCardImage,
    setCardFullImage,
    fetchCardFullImage,
    triggerCardImageError,
} = useCardFullImage();

How to get full image card?

  • Use the fetchCardFullImage function, and invoke CardsService from LinkerStudio/modules/baas/common/services/CardsService to get full image card:

const fetchCardFullImage = async (cardId: string) => {
    try {
      const {data} = await CardsService.fetchCardImage(cardId);
    } catch (error) {
      return error
    } 
};

Last updated