summaryrefslogtreecommitdiff
path: root/src/lib/promo/components/Promocrumb.jsx
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2024-06-07 17:08:09 +0700
committerit-fixcomart <it@fixcomart.co.id>2024-06-07 17:08:09 +0700
commitc88d98f06a6301bad6dd6d2e58b4908d8562638c (patch)
tree282633b855acf235fe1d0d78b67d8cd46e032c03 /src/lib/promo/components/Promocrumb.jsx
parent6ac1792ee37e5a5a9438f61e708966c944b61914 (diff)
<iman> add promotion program
Diffstat (limited to 'src/lib/promo/components/Promocrumb.jsx')
-rw-r--r--src/lib/promo/components/Promocrumb.jsx40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/lib/promo/components/Promocrumb.jsx b/src/lib/promo/components/Promocrumb.jsx
new file mode 100644
index 00000000..a96ec6b4
--- /dev/null
+++ b/src/lib/promo/components/Promocrumb.jsx
@@ -0,0 +1,40 @@
+import { Breadcrumb as ChakraBreadcrumb, BreadcrumbItem, BreadcrumbLink } from '@chakra-ui/react'
+import Link from 'next/link'
+import React from 'react'
+
+/**
+ * Renders a breadcrumb component with links to navigate through different pages.
+ *
+ * @param {Object} props - The props object containing the brand name.
+ * @param {string} props.brandName - The name of the brand to display in the breadcrumb.
+ * @return {JSX.Element} The rendered breadcrumb component.
+ */
+const Breadcrumb = ({ brandName }) => {
+ return (
+ <div className='container mx-auto py-4 md:py-6'>
+ <ChakraBreadcrumb>
+ <BreadcrumbItem>
+ <BreadcrumbLink as={Link} href='/' className='!text-danger-500 whitespace-nowrap'>
+ Shop
+ </BreadcrumbLink>
+ </BreadcrumbItem>
+
+ <BreadcrumbItem>
+ <BreadcrumbLink
+ as={Link}
+ href='/shop/promo'
+ className='!text-danger-500 whitespace-nowrap'
+ >
+ Promo
+ </BreadcrumbLink>
+ </BreadcrumbItem>
+
+ <BreadcrumbItem isCurrentPage>
+ <BreadcrumbLink className='whitespace-nowrap'>{brandName}</BreadcrumbLink>
+ </BreadcrumbItem>
+ </ChakraBreadcrumb>
+ </div>
+ )
+}
+
+export default Breadcrumb