export const getQuery = (key) => {
    let searchInfo = location.search.substr(1).split("&");
    let searchObj = {};
    searchInfo.forEach(i=>{
        let obj = i.split("=");
        searchObj[obj[0]] = obj[1];
    });
    return searchObj[key];
}