Skip to content

Commit

Permalink
fix: error fixing...
Browse files Browse the repository at this point in the history
  • Loading branch information
muhammadshakkeerp committed Feb 18, 2024
1 parent 0500118 commit 4a6b48c
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions src/components/Checkout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,6 @@ export const Checkout: React.FC = () => {
const [name, setName] = useState('');
const [email, setEmail] = useState('');
const [address, setAddress] = useState('');
const [paymentMethod, setPaymentMethod] = useState('');

const handlePlaceOrder = () => {
// Handle placing the order, e.g., sending data to backend, etc.
// Redirect to order confirmation page
// history.push('/order-confirmation');
};

useEffect(() => {
window.scrollTo(0, 0)
Expand Down Expand Up @@ -61,7 +54,6 @@ export const Checkout: React.FC = () => {

{/* Place Order Button */}
<button
onClick={handlePlaceOrder}
className="bg-blue-500 text-white px-6 py-3 rounded-md hover:bg-blue-600 transition-colors"
>
<Link to={`/productDetails/${id}/checkout/successfull`} > Place Order</Link>
Expand All @@ -75,19 +67,11 @@ export const Payment: React.FC = () => {
// const history = useHistory();

// State for form fields
const [name, setName] = useState('');
const [email, setEmail] = useState('');
const [address, setAddress] = useState('');
const [paymentMethod, setPaymentMethod] = useState('');
const [cardNumber, setCardNumber] = useState('');
const [expiryDate, setExpiryDate] = useState('');
const [cvv, setCVV] = useState('');

const handlePlaceOrder = () => {
// Handle placing the order, e.g., sending data to backend, etc.
// Redirect to order confirmation page
// history.push('/order-confirmation');
};

// Function to render payment method form based on the selected payment method
const renderPaymentMethodForm = () => {
Expand Down

0 comments on commit 4a6b48c

Please sign in to comment.