From 6dddb6731ae393f1da91eb438c78e5fd74c27d46 Mon Sep 17 00:00:00 2001 From: Suraj Mahto Date: Mon, 28 Oct 2024 22:59:40 +0530 Subject: [PATCH] feat : changed brandname url to lowercase --- src/app/brand/[id]/page.js | 2 +- src/app/brands/page.js | 2 +- src/components/brand.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/brand/[id]/page.js b/src/app/brand/[id]/page.js index 99b7c0b..5bca79a 100644 --- a/src/app/brand/[id]/page.js +++ b/src/app/brand/[id]/page.js @@ -7,7 +7,7 @@ import Header1 from '../../../components/header1' import Footer from '../../../components/footer' const Brand = ({ params }) => { - const brandName = params?.id.replace(/-/g, ' '); + const brandName = params?.id.replace(/-/g, ' ').replace(/\b\w/g, char => char.toUpperCase()); const [brand, setBrand] = useState([]); const [collections, setcollections] = useState([]); diff --git a/src/app/brands/page.js b/src/app/brands/page.js index e30596f..b2ea838 100644 --- a/src/app/brands/page.js +++ b/src/app/brands/page.js @@ -78,7 +78,7 @@ const Page = () => {
{brands?.map((brand, index) => ( - +
{
{limitedBrands?.map((brand, index) => ( - +