let room = document.location.pathname.match(/\/room\/([^\/]+)/); if (room) { room = room[1]; } else { room = null; } export default room;