diff --git a/frontend/src/Pages/Payment.jsx b/frontend/src/Pages/Payment.jsx index 709ce12..db13b26 100644 --- a/frontend/src/Pages/Payment.jsx +++ b/frontend/src/Pages/Payment.jsx @@ -2,41 +2,45 @@ import React, { useState } from 'react'; import { useNavigate } from 'react-router-dom'; import backicon from '../assets/svg/backicon.svg'; - - const Payment = () => { const [paymentMethod, setPaymentMethod] = useState(''); const [cardNumber, setCardNumber] = useState(''); const [expiryDate, setExpiryDate] = useState(''); const [cvv, setCvv] = useState(''); + const [upiId, setUpiId] = useState(''); + const navigate = useNavigate(); const handleSubmit = (e) => { e.preventDefault(); - console.log('Payment submitted:', { paymentMethod, cardNumber, expiryDate, cvv }); + alert('Payment submitted successfully!'); }; - const navigate = useNavigate(); + const handlePaymentMethodChange = (e) => { + setPaymentMethod(e.target.value); + setCardNumber(''); + setExpiryDate(''); + setCvv(''); + setUpiId(''); + }; - const HomeClick = () => { - navigate('/'); // Navigates to the home page - }; - return ( + const handleHomeClick = () => navigate('/'); -