31 lines
598 B
JavaScript
31 lines
598 B
JavaScript
import React, { useState } from "react";
|
|
import "./home.css";
|
|
import { PayPal, Purchase, ShowCase, Home } from '.';
|
|
import { AllProducts} from "../products"
|
|
|
|
// component
|
|
const Details = () => {
|
|
const [cart, setCart] = useState([]);
|
|
|
|
return (
|
|
<>
|
|
<ShowCase />
|
|
<AllProducts setCart={setCart}/>
|
|
<Purchase />
|
|
<PayPal cart={cart}/>
|
|
</>
|
|
);
|
|
};
|
|
|
|
const Landing = () => {
|
|
const [showDetails, setShowDetails] = useState(false);
|
|
|
|
return (
|
|
<>
|
|
{showDetails ? <Details /> : <Home goNext={() => setShowDetails(true)} />}
|
|
</>
|
|
);
|
|
};
|
|
|
|
export default Landing;
|