Javascript Get Url Without Query String In Reactjs