import { useCallback } from 'react' export const usePaymentContext = () => { const storePaymentContext = useCallback((context: any) => { localStorage.setItem('stripe_payment_context', JSON.stringify(context)) }, []) const getPaymentContext = useCallback(() => { const storedContext = localStorage.getItem('stripe_payment_context') return storedContext ? JSON.parse(storedContext) : null }, []) const clearPaymentContext = useCallback(() => { localStorage.removeItem('stripe_payment_context') }, []) return { storePaymentContext, getPaymentContext, clearPaymentContext } }