useEffect (() => { const fetchStripeClient = async () => { const result = await client . query ({ query : QUERY_STRIPE_CLIENT_SECRET , variables : { amount : Math . floor ( totalOfOrder * 100 ) }, }) const { data : { getStripeClientSecret }, } = result setStripeClientSecret ( getStripeClientSecret ) } if ( fetchingStripeClient ) { fetchStripeClient () setFetchingStripeClient ( false ) } }, [ fetchingStripeClient , client , totalOfOrder ]) import React , { useState , useEffect } from 'react' import { useQuery } from '@apollo/react-hooks' import { QUERY_LISTING } from './queries' import { ApolloError } from 'apollo-client' interface Props { listingId : string } function useListingData < T >( initialValue : T , listingId : T ): [ T , ApolloError | undefined , React . Dispatch < T >] { const [ listingData , setListingD...