import React, { Component } from "react"; import { Navigate } from "react-router-dom"; import { CategoryNavBar } from "../category/categoryNavBar/CategoryNavBar"; import { SearchBar } from "../search/searchBar/SearchBar"; import bestSellers from "../../images/bestSellers.png"; import pastOrders from "../../images/pastOrders.png"; import "./checkout.css"; interface CheckoutProps { } interface CheckoutState { toPastOrders: boolean; } export default class Checkout extends Component { constructor(props: CheckoutProps) { super(props); this.state = { toPastOrders: false, }; } onViewReceipt = () => { this.setState({ toPastOrders: true }); } render() { if (this.state.toPastOrders) return return (

Purchase confirmed

Your purchase is complete!

Best sellers Past orders
); } }