diff --git a/src/components/input/index.jsx b/src/components/input/index.jsx index f64c09b..2934f7f 100644 --- a/src/components/input/index.jsx +++ b/src/components/input/index.jsx @@ -1,4 +1,7 @@ import clsx from "clsx"; + +import { cn } from "@/lib/utils"; + const Input = ({ name, type, @@ -8,6 +11,7 @@ const Input = ({ requiredMessage, validation, errors, + className = "", }) => { return ( <> @@ -24,12 +28,13 @@ const Input = ({ })} placeholder={placeholder} type={type} - className={clsx( + className={cn( "p-2 block w-full border rounded-md focus:outline-none focus:ring-2 focus:ring-green", { "border-red": errors[name], "border-slate-300": !errors[name], }, + className, )} /> {errors[name] && ( diff --git a/src/constants/index.js b/src/constants/index.js index 0738f59..177101e 100644 --- a/src/constants/index.js +++ b/src/constants/index.js @@ -101,42 +101,42 @@ export const categories = [ id: 1, title: "Electronics", imgSrc: "/images/category_img/category_electronics.webp", - href: "/?category=electronics", + href: "products/?category=electronics", }, { id: 2, title: "Academic", imgSrc: "/images/category_img/category_academic.webp", - href: "/?category=academic", + href: "products/?category=academic", }, { id: 3, title: "Clothes", imgSrc: "/images/category_img/category_clothes.webp", - href: "/?category=clothes", + href: "products/?category=clothes", }, { id: 4, title: "Dorm", imgSrc: "/images/category_img/category_dorm.webp", - href: "/?category=dorm", + href: "products/?category=dorm", }, { id: 5, title: "Entertainment", imgSrc: "/images/category_img/category_entertainment.webp", - href: "/?category=entertainment", + href: "products/?category=entertainment", }, { id: 6, title: "Beauty", imgSrc: "/images/category_img/category_beauty.webp", - href: "/?category=beauty", + href: "products/?category=beauty", }, { id: 7, title: "Other", imgSrc: "/images/category_img/category_other.webp", - href: "/?category=other", + href: "products/?category=other", }, ]; diff --git a/src/layout/Layout.jsx b/src/layout/Layout.jsx index e5039ae..b93962f 100644 --- a/src/layout/Layout.jsx +++ b/src/layout/Layout.jsx @@ -4,7 +4,7 @@ import Navbar from "@/components/navbar/Navbar"; export default function Layout({ children }) { return (