product path

This commit is contained in:
CHIEFSOFT\ameye
2024-12-14 11:57:57 -05:00
parent d4366b39a6
commit 82ee55800a
5 changed files with 26 additions and 7 deletions
+8 -2
View File
@@ -1,10 +1,16 @@
import React from "react";
import BreadcrumbComBS from "../breadcrumb/BreadcrumbComBS";
import getImage from "../../utils/getImage";
// import getImage from "../../utils/getImage";
import ProductStart from "./ProductStart";
import { useLocation } from 'react-router-dom';
export default function ProductFactory(){
const location = useLocation();
const pathname = location.pathname;
// Split the pathname by '/' and get the last element
const lastPart = pathname.split('/').pop();
console.log(lastPart)
return(
<>