const TOKENKEY = "mmc-token";
const USERKEY = "mmc-custManage";

const getToken = () => {
  return localStorage.getItem(TOKENKEY);
};

const setToken = (token: string) => {
  localStorage.setItem(TOKENKEY, token);
};

const getUser = () => {
  return localStorage.getItem(USERKEY);
};

const setUser = (user: Object) => {
  localStorage.setItem(USERKEY, JSON.stringify(user));
};

export { getToken, setToken, getUser, setUser };
