product path
This commit is contained in:
@@ -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(
|
||||
<>
|
||||
|
||||
Reference in New Issue
Block a user