const url = window.location.href;
        const slug = url.substring(url.lastIndexOf('/') + 1); 

By toihid