Functions
[useGiftCards(props)] ⇒ [GiftCardsTalonProps]
Handles the logic for a component that renders a list of gift cards. It performs effects and returns the prop data necessary for rendering the component.
This talon performs the following effects:
- Fetch the currently applied gift cards for a cart
- Manage the updating state of the cart while a gift card is being applied or removed
[useGiftCard(props)] ⇒ [GiftCardTalonProps]
Provide logic for a single gift card component.
Typedefs
[GiftCardsMutations] : Object
GraphQL mutations for Gift Cards.
[GiftCardsQueries] : Object
GraphQL queries for Gift Cards.
[GiftCardsTalonProps] : Object
Props data to use when rendering a list of gift cards.
[GiftCardTalonProps] : Object
Props data to use when rendering a single gift card component.
Handles the logic for a component that renders a list of gift cards. It performs effects and returns the prop data necessary for rendering the component.
This talon performs the following effects:
- Fetch the currently applied gift cards for a cart
- Manage the updating state of the cart while a gift card is being applied or removed
Returns: Parameters
ObjectfunctionGiftCardsMutationsGiftCardsQueriesExample (Importing into your project)
import { useGiftCards } from '@magento/peregrine/lib/talons/CartPage/GiftCards'
Provide logic for a single gift card component.
Returns: Parameters
ObjectStringfunctionExample (Importing into your project)
import { useGiftCard } from '@magento/peregrine/lib/talons/CartPage/GiftCards/useGiftCard';
GraphQL mutations for Gift Cards.
See: giftCardQueries.ee.js for queries used in Venia
Properties
GraphQLASTGraphQLASTGraphQL queries for Gift Cards.
See: giftCardQueries.ee.js for queries used in Venia
Properties
GraphQLASTGraphQLASTProps data to use when rendering a list of gift cards.
Properties
functionObjectfunctionbooleanbooleanbooleanbooleanArraybooleanbooleanbooleanbooleanfunctionbooleanbooleanProps data to use when rendering a single gift card component.
Properties
functionSource Code: pwa-studio/packages/peregrine/lib/talons/CartPage/GiftCards/useGiftCards.js