Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

initial commit #15

Open
wants to merge 1 commit into
base: startup
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46,959 changes: 21,577 additions & 25,382 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"react-paginate": "^8.1.4",
"react-redux": "^7.2.6",
"react-router-dom": "^6.2.1",
"react-scripts": "4.0.3",
"react-scripts": "^5.0.1",
"reactstrap": "^9.0.1",
"redux-logger": "^3.0.6",
"remixicon": "^2.5.0",
Expand Down
Binary file added src/assets/images/pizzaMan.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/components/Footer/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const Footer = () => {
<h5>MyPizza</h5>
<p>Best Pizzas in town, try it out!</p>
</div>
<div>
<div >
<h5 className="footer__title mb-3">Delivery Time</h5>
<ListGroup>
<div className="delivery__time-item border-0 ps-0">
Expand Down
14 changes: 7 additions & 7 deletions src/components/Header/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const Header = () => {
const totalQuantity = useSelector((state) => state.cart.totalQuantity);
const dispatch = useDispatch();

const toggleMenu = () => menuRef.current.classList.toggle("show__menu");
const toggleMenu = () => menuRef.current?.classList.toggle("show__menu");
let navigate = useNavigate();

const toggleCart = () => {
Expand All @@ -47,16 +47,16 @@ const Header = () => {
useEffect(() => {
window.addEventListener("scroll", () => {
if (
document.body.scrollTop > 80 ||
document.documentElement.scrollTop > 80
document?.body.scrollTop > 80 ||
document?.documentElement?.scrollTop > 80
) {
headerRef.current.classList.add("header__shrink");
headerRef?.current?.classList?.add("header__shrink");
} else {
headerRef.current.classList.remove("header__shrink");
headerRef?.current?.classList?.remove("header__shrink");
}
});

return () => window.removeEventListener("scroll");
return () => window?.removeEventListener("scroll");
}, []);

return (
Expand All @@ -65,7 +65,7 @@ const Header = () => {
<div className="nav__wrapper d-flex align-items-center justify-content-between">
<div className="logo" onClick={() => navigate("/home")}>
<img src={logo} alt="logo" />
<h5>Tasty Treat</h5>
<h5>CheesySlice</h5>
</div>
{/* ======= menu ======= */}
<div className="navigation" ref={menuRef} onClick={toggleMenu}>
Expand Down
3 changes: 3 additions & 0 deletions src/components/Layout/Layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,15 @@ const Layout = () => {
<div>
<Routes />
</div>

<div className="footerSection" style={{ display: 'grid', gridTemplateColumns: 'repeat(3, 1fr)', gap: '10px', paddingLeft: '70px' }} >
<Footer />
<Footer />
<Footer />
<Footer />
<Footer />
<Footer />
</div>

</div>
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/UI/cart/CartItem.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const CartItem = ({ item, onClose }) => {
<div>
<h6 className="cart__product-title">{title}</h6>
<p className=" d-flex align-items-center gap-5 cart__product-price">
{quantity}x <span>${price}</span>
{quantity}x <span>{price}</span>
</p>
<div className="d-flex flex-column">
{
Expand Down
2 changes: 1 addition & 1 deletion src/components/UI/cart/Carts.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const Carts = () => {

<div className="cart__bottom d-flex align-items-center justify-content-between">
<h6>
Subtotal : <span>${totalAmount}</span>
Subtotal : <span> Rs{totalAmount}</span>
</h6>
<button>
<Link to="/checkout" onClick={toggleCart}>
Expand Down
2 changes: 1 addition & 1 deletion src/components/UI/product-card/ProductCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const ProductCard = (props) => {
</h5>
</div>
<div className="d-flex flex-column align-items-center justify-content-between">
<span className="product__price mb-2">{price} </span>
<span className="product__price mb-2">{price} </span>
<button className="addTOCART__btn" onClick={addToCart}>
Add to Cart
</button>
Expand Down
3 changes: 2 additions & 1 deletion src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,6 @@ h2 {
}

section {
padding: 60px 0px;
padding: 10px 0px;
background-color: beige;
}
2 changes: 1 addition & 1 deletion src/pages/Home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Container, Row, Col } from "reactstrap";

import { Link } from "react-router-dom";

import guyImg from "../assets/images/delivery-guy.png";
import guyImg from "../assets/images/pizzaMan.png";
import "../styles/hero-section.css";

const Home = () => {
Expand Down
4 changes: 2 additions & 2 deletions src/pages/PizzaDetails.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ const PizzaDetails = () => {
<h2 className="product__title mb-3">{title}</h2>
<p className="product__price">
{" "}
Price: <span>${price}</span>
Price: <span> Rs{price}</span>
</p>
<p className="category mb-5">
Category: <span>{category}</span>
Expand All @@ -145,7 +145,7 @@ const PizzaDetails = () => {
<div className="extraIngredientsGrid">
{(Object.values(ExtraIngredients)).map((ingredient) => {
return (
<ExtraIngredient isChecked={extraIngredients.includes(ingredient)} key={ingredient} onSelect={ingredient => updateExtraIngredients(ingredient)} ingredient={ingredient}></ExtraIngredient>
<ExtraIngredient isChecked={extraIngredients?.includes(ingredient)} key={ingredient} onSelect={ingredient => updateExtraIngredients(ingredient)} ingredient={ingredient}></ExtraIngredient>
)
})}
</div>
Expand Down
11 changes: 7 additions & 4 deletions src/styles/footer.css
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
.footer {
padding: 50px 0px;
background: #fde4e4;
display: flex;
text-align: start;
justify-content: center;
gap: 8rem;
align-items: center;
align-items: flex-start;
flex-direction: column;
}

.footer__logo img {
Expand All @@ -16,7 +15,7 @@
.footer__logo h5 {
font-weight: 600;
font-size: 1rem;
margin-bottom: 15px;
/* margin-bottom: 15px; */
}

.footer__logo p {
Expand Down Expand Up @@ -48,6 +47,10 @@
font-weight: 600;
}

.FooterWrapper{

}

@media only screen and (max-width: 768px) {
.footer {
flex-direction: column;
Expand Down