diff --git a/src/component/product/ProductFactory.jsx b/src/component/product/ProductFactory.jsx index a57d678..9efeea5 100644 --- a/src/component/product/ProductFactory.jsx +++ b/src/component/product/ProductFactory.jsx @@ -11,6 +11,7 @@ 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)