import { FC, useState } from 'react' import cn from 'classnames' import s from './ShippingView.module.css' import Button from '@components/ui/Button' import { useUI } from '@components/ui/context' import SidebarLayout from '@components/common/SidebarLayout' import countries from '@lib/countries' const PaymentMethodView: FC = () => { const { paymentMethodDetails, setShippingAddress, setSidebarView, setUseBillingAddressForShipping, shippingAddress, useBillingAddressForShipping } = useUI() const handleUseBillingAddressForShipping = (event) => { setUseBillingAddressForShipping(event.target.value === 'true') if (event.target.value === 'true') { setShippingAddress({ firstName: paymentMethodDetails.address?.firstName, lastName: paymentMethodDetails.address?.lastName, company: paymentMethodDetails.address?.company, addressLine1: paymentMethodDetails.address?.addressLine1, addressLine2: paymentMethodDetails.address?.addressLine2, postalCode: paymentMethodDetails.address?.postalCode, city: paymentMethodDetails.address?.city, countryOrRegion: paymentMethodDetails.address?.countryOrRegion, }) } } const updateAddressData = ({ target }: any) => setShippingAddress({ ...shippingAddress, [target.name]: target.value, }) return ( setSidebarView('CHECKOUT_VIEW')}>

Shipping


) } export default PaymentMethodView