From 5358ed74b12ad915c604f5490695dad0d511934a Mon Sep 17 00:00:00 2001 From: Olena Date: Tue, 12 Sep 2023 13:29:31 +0300 Subject: [PATCH 1/2] add route for contacts, add breadcrumbs for ContactsPage and CartPage --- src/Root.tsx | 4 +++- src/components/Footer.tsx | 6 +++--- src/pages/CartPage.tsx | 16 +++++----------- src/pages/ContactsPage.tsx | 16 ++++++++++++++++ 4 files changed, 27 insertions(+), 15 deletions(-) create mode 100644 src/pages/ContactsPage.tsx diff --git a/src/Root.tsx b/src/Root.tsx index 20dffee..a03000f 100644 --- a/src/Root.tsx +++ b/src/Root.tsx @@ -5,6 +5,7 @@ import { Route, Routes, } from 'react-router-dom'; +import { Toaster } from 'react-hot-toast'; import App from './App'; import CatalogPage from './pages/CatalogPage'; import NotFoundPage from './pages/NotFoundPage'; @@ -13,7 +14,7 @@ import ScrollToTop from './components/ScrollToTop'; import FavouritesPage from './pages/FavouritesPage'; import CartPage from './pages/CartPage'; import HomePage from './pages/HomePage'; -import { Toaster } from 'react-hot-toast'; +import ContactsPage from './pages/ContactsPage'; export const Root = () => ( @@ -37,6 +38,7 @@ export const Root = () => ( } /> } /> + } /> } /> diff --git a/src/components/Footer.tsx b/src/components/Footer.tsx index c148faa..9924488 100644 --- a/src/components/Footer.tsx +++ b/src/components/Footer.tsx @@ -34,12 +34,12 @@ export const Footer = () => {
  • - Contacts - +
  • diff --git a/src/pages/CartPage.tsx b/src/pages/CartPage.tsx index 6319ed8..3adf46e 100644 --- a/src/pages/CartPage.tsx +++ b/src/pages/CartPage.tsx @@ -1,18 +1,17 @@ import classNames from 'classnames'; -import React, { useState } from 'react'; -import { FiChevronLeft } from 'react-icons/fi'; -import { NavLink, useNavigate } from 'react-router-dom'; +import { useState } from 'react'; +import { NavLink } from 'react-router-dom'; import { Button } from '../components/Button'; import CartItem from '../components/CartItem'; import { CheckoutModal } from '../components/CheckoutModal'; import { clearCart, useAppDispatch, useAppSelector } from '../redux'; import { getTotalProductsCost } from '../utils/getTotalCost'; import { getTotalItemsCount } from '../utils/getTotalItemsCount'; +import BreadCrumb from '../components/BreadCrumb'; const CartPage = () => { const { items: cartItems } = useAppSelector((state) => state.cart); const [showModal, setShowModal] = useState(false); - const navigate = useNavigate(); const dispatch = useAppDispatch(); const totalCost = getTotalProductsCost(cartItems); @@ -40,13 +39,8 @@ const CartPage = () => { { 'blur pointer-events-none': showModal }, )} > - navigate(-1)} - className="select-none cursor-pointer flex items-center gap-1" - > - - Back - + +

    Cart diff --git a/src/pages/ContactsPage.tsx b/src/pages/ContactsPage.tsx new file mode 100644 index 0000000..21694de --- /dev/null +++ b/src/pages/ContactsPage.tsx @@ -0,0 +1,16 @@ +import BreadCrumb from '../components/BreadCrumb'; + +const ContactsPage = () => { + return ( +
    + + +

    Our Team:

    +
    + ); +}; + +export default ContactsPage; From c4ae6f4a392936aece9599908b4b00dfb8259161 Mon Sep 17 00:00:00 2001 From: Olena Date: Tue, 12 Sep 2023 15:49:53 +0300 Subject: [PATCH 2/2] add Contacts page layout, fix breadcrumps positioning in CartPage --- src/pages/CartPage.tsx | 2 +- src/pages/ContactsPage.tsx | 67 ++++++++++++++++++++++++++++++++++++-- 2 files changed, 65 insertions(+), 4 deletions(-) diff --git a/src/pages/CartPage.tsx b/src/pages/CartPage.tsx index 3adf46e..31a2a93 100644 --- a/src/pages/CartPage.tsx +++ b/src/pages/CartPage.tsx @@ -35,7 +35,7 @@ const CartPage = () => { )}
    diff --git a/src/pages/ContactsPage.tsx b/src/pages/ContactsPage.tsx index 21694de..b32702a 100644 --- a/src/pages/ContactsPage.tsx +++ b/src/pages/ContactsPage.tsx @@ -3,12 +3,73 @@ import BreadCrumb from '../components/BreadCrumb'; const ContactsPage = () => { return (
    -

    Our Team:

    +
    +

    + Our Team +

    +
    + +
    +
    +

    Olena Vats

    +
    +
    +

    Olena Vats

    +
    +
    +

    Olena Vats

    +
    +
    +

    Olena Vats

    +
    +
    +

    Olena Vats

    +
    +
    +

    Olena Vats

    +
    +
    ); };