React Get Query String Javascript Substring Method