Skip to content

Commit

Permalink
feat : changed brandname url to lowercase
Browse files Browse the repository at this point in the history
  • Loading branch information
surajhub255 committed Oct 28, 2024
1 parent 0f08c1e commit 6dddb67
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/app/brand/[id]/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -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([]);
Expand Down
2 changes: 1 addition & 1 deletion src/app/brands/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ const Page = () => {

<div className="flex text-2xl" style={{justifyContent: 'center', marginTop:'40px', paddingBottom:'200px', gap:'70px', flexWrap: 'wrap'}}>
{brands?.map((brand, index) => (
<Link href={`/brand/${brand.name.replace(/\s+/g, '-')}`} key={index}>
<Link href={`/brand/${brand.name.toLowerCase().replace(/\s+/g, '-')}`} key={index}>
<div key={index} className="flex flex-col justify-center items-center">
<img
src={`${
Expand Down
2 changes: 1 addition & 1 deletion src/components/brand.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const Brand = ({ brandsdata }) => {

<div className="flex flex-wrap justify-center gap-6 sm:gap-8 lg:gap-10 mt-6 sm:mt-8 lg:mt-10 pb-20">
{limitedBrands?.map((brand, index) => (
<Link href={`/brand/${brand.name.replace(/\s+/g, '-')}`} key={index} className="flex flex-col justify-center items-center">
<Link href={`/brand/${brand.name.toLowerCase().replace(/\s+/g, '-')}`} key={index} className="flex flex-col justify-center items-center">
<div className="flex flex-col justify-center items-center">
<img
src={`https://nftstorage.link/ipfs/${brand.logo_image.slice(7)}`}
Expand Down

0 comments on commit 6dddb67

Please sign in to comment.