export const setUserInfo = (user:Object)=>{
    if(localStorage.getItem('userInfo')){
        localStorage.removeItem('userInfo')
        localStorage.setItem('userInfo',JSON.stringify(user))
     }else{
        localStorage.setItem('userInfo',JSON.stringify(user))
     }
}

export const getUserInfo = ()=>{
    if(localStorage.getItem('userInfo')){
      return localStorage.getItem('userInfo')
     }else{
       return {}
     }
}