export const  setToken = (token:String) =>{
    console.log(token,'token');
    
    if(localStorage.getItem('session_id')){
       localStorage.removeItem('session_id')
       localStorage.setItem('session_id',JSON.stringify(token))
    }else{
        localStorage.setItem('session_id',JSON.stringify(token))
    }
}

export const  getToken = () =>{
    if(localStorage.getItem('session_id')){
        const token:any = localStorage.getItem('session_id')
       return  JSON.parse(token)
    }else{
        return ''
    }
}