From cec631389135b160744b2ad2a84183d6f43c3fcc Mon Sep 17 00:00:00 2001 From: Nader Dabit Date: Wed, 6 Jan 2021 00:11:19 -0600 Subject: [PATCH] improved accessibility --- README.md | 2 +- components/CartLink.js | 2 +- components/ListItem.js | 2 +- components/Nav.js | 62 ---------------------- components/ViewInventory.js | 6 +-- components/header.js | 43 --------------- components/heroComponents/DisplayMedium.js | 2 +- components/heroComponents/DisplaySmall.js | 2 +- layouts/layout.js | 10 ++-- pages/cart.js | 8 +-- pages/categories.js | 2 +- pages/checkout.js | 2 +- pages/index.js | 2 +- pages/product/[name].js | 2 +- utils/inventoryForCategory.js | 2 +- utils/inventoryProvider.js | 4 +- 16 files changed, 25 insertions(+), 128 deletions(-) delete mode 100755 components/Nav.js delete mode 100755 components/header.js diff --git a/README.md b/README.md index 20f29bb..89038a2 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,7 @@ This project is styled using Tailwind. To learn more how this works, check out t The main files, components, and images you may want to change / modify are: __Logo__ - src/images/logo.png -__Buttons, Nav, Header__ - src/components +__Button, ListItem, etc..__ - src/components __Form components__ - src/components/formComponents __Context (state)__ - src/context/mainContext.js __Pages (admin, cart, checkout, index)__ - src/pages diff --git a/components/CartLink.js b/components/CartLink.js index 68d574b..609015c 100755 --- a/components/CartLink.js +++ b/components/CartLink.js @@ -16,7 +16,7 @@ function CartLink(props) {
- + diff --git a/components/ListItem.js b/components/ListItem.js index ffc6e15..394ebcf 100755 --- a/components/ListItem.js +++ b/components/ListItem.js @@ -11,7 +11,7 @@ const ListItem = ({ link, title, imageSrc, price }) => ( p1 sm:p-2 "> - +
{title} diff --git a/components/Nav.js b/components/Nav.js deleted file mode 100755 index d78e2f5..0000000 --- a/components/Nav.js +++ /dev/null @@ -1,62 +0,0 @@ -import React from 'react' - -import { titleIfy, slugify } from '../../utils/helpers' -import { FaShoppingCart, FaCircle } from 'react-icons/fa'; -import Link from "next/link" - -import { SiteContext, ContextProviderComponent } from '../context/mainContext' - -class Nav extends React.Component { - render() { - let { numberOfItemsInCart, navItems: { navInfo: { data: links }}} = this.props.context - - links = links.map(link => { - const newLink = {} - newLink.link = slugify(link) - newLink.name = titleIfy(link) - return newLink - }) - links.unshift({ name: 'Home', link: '/'}) - return ( - <> - -
- - - - { - numberOfItemsInCart > Number(0) && ( -
- -
- ) - } -
- - ) - } -} - -function NavWithContext(props) { - return ( - - - { - context =>