diff --git a/client/data/Lates-product.tsx b/client/data/Lates-product.tsx index d17e3a6..80db06a 100644 --- a/client/data/Lates-product.tsx +++ b/client/data/Lates-product.tsx @@ -26,6 +26,7 @@ const latesProducts = [ rating: 5, brand: "EVOLIS", price: 300, + category: "sdf", quantity: 1, }, { @@ -35,6 +36,7 @@ const latesProducts = [ rating: 5, brand: "FUJIFILM", price: 3300, + category: "sdf", quantity: 1, }, { @@ -44,6 +46,7 @@ const latesProducts = [ rating: 5, brand: "RIBBON", price: 98, + category: "sdf", quantity: 1, }, { @@ -63,6 +66,7 @@ const latesProducts = [ rating: 5, brand: "EVOLIS", price: 300, + category: "sdf", quantity: 1, }, { @@ -72,6 +76,7 @@ const latesProducts = [ rating: 5, brand: "FUJIFILM", price: 3100, + category: "sdf", quantity: 1, }, ]; diff --git a/client/public/images/angkor-rawpixel.jpg b/client/public/images/angkor-rawpixel.jpg new file mode 100644 index 0000000..9f3ff10 Binary files /dev/null and b/client/public/images/angkor-rawpixel.jpg differ diff --git a/client/public/images/jcomp.jpg b/client/public/images/jcomp.jpg new file mode 100644 index 0000000..5dfbb3d Binary files /dev/null and b/client/public/images/jcomp.jpg differ diff --git a/client/src/App.tsx b/client/src/App.tsx index f397733..43ad42c 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -13,13 +13,24 @@ import News from "./pages/news"; import SinglePageNews from "./pages/news/singlePage"; import Favorite from "./pages/favorite"; import Order from "./pages/order"; +import Login from "./pages/login"; +import { useLocation } from "@solidjs/router"; +import NotFound from "./pages/404"; +import Register from "./pages/register"; +import Reset from "./pages/reset"; const App: Component = () => { + const location = useLocation(); return (
- + {location.pathname !== "/login" && + location.pathname !== "/register" && + location.pathname !== "/reset" && } + + + @@ -31,8 +42,11 @@ const App: Component = () => { + -
); }; diff --git a/client/src/components/cards/Cards.tsx b/client/src/components/cards/Cards.tsx index 8c437e1..e164213 100644 --- a/client/src/components/cards/Cards.tsx +++ b/client/src/components/cards/Cards.tsx @@ -12,9 +12,7 @@ export type Product = { category: string; quantity: number; }; -interface Props { - props: Product; -} + const Cards: Component<{ product: Product }> = (props) => { const { cartItems, addToCart } = useCartContext(); const navigate = useNavigate(); @@ -37,7 +35,7 @@ const Cards: Component<{ product: Product }> = (props) => { }} data-aos="zoom-out-down" > -
+
= (props) => { onClick={(e) => { e.stopPropagation(); }} - class="z-40 transition ease-in duration-300 bg-gray-50 hover:text-danger shadow hover:shadow-md text-red-300 rounded-full w-8 h-8 text-center p-1" + class="z-40 transition ease-in duration-300 bg-gray-50 hover:text-danger shadow hover:shadow-md text-red-300 rounded-full w-8 h-8 lg:h-6 lg:w-6 2xl:h-8 2xl:w-8 text-center p-1" > @@ -67,7 +65,7 @@ const Cards: Component<{ product: Product }> = (props) => {
product image @@ -133,7 +131,7 @@ const Cards: Component<{ product: Product }> = (props) => { props?.product?.name?.length > 35 ? "mt-1" : "mt-7" }`} > - + ${props.product?.price} {!isInCart() ? ( @@ -142,7 +140,7 @@ const Cards: Component<{ product: Product }> = (props) => { e.stopPropagation(); handleAddTocart(props.product); }} - class="text-primary hover:text-white border border-primary hover:border-danger hover:bg-danger focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-full text-sm px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800" + class="text-primary hover:text-white border border-primary hover:border-danger hover:bg-danger focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-full text-sm px-5 py-2.5 lg:py-1.5 2xl:py-2 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800" > Add to cart @@ -152,7 +150,7 @@ const Cards: Component<{ product: Product }> = (props) => { e.stopPropagation(); navigate(`/cart`); }} - class="text-white hover:text-white border bg-danger hover:bg-red-500 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-full text-sm px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800" + class="text-white hover:text-white border bg-danger hover:bg-red-500 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-full text-sm px-5 py-2.5 lg:py-1.5 2xl:py-2 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800" > View Cart diff --git a/client/src/components/layouts/Footer.tsx b/client/src/components/layouts/Footer.tsx index 2c2159f..044f5cb 100644 --- a/client/src/components/layouts/Footer.tsx +++ b/client/src/components/layouts/Footer.tsx @@ -3,7 +3,7 @@ import { Component } from "solid-js"; const Footer: Component = () => { return ( -