const LoginKey = "intelligent-Medicine-cabinet-mini-pro-web-Logined-User"

export function setLoginedUser(user) {
    if(user) {
        localStorage.setItem(LoginKey, JSON.stringify(user))
    }
}

export function getLoginedUser() {
    let user = localStorage.getItem(LoginKey)
    if(user) {
        user = JSON.parse(user)
        return user
    }
    return null
}

export function removeLoginedUser() {
    localStorage.removeItem(LoginKey)
}