export const getToken = () => localStorage.getItem('token');

export const isAuthenticated = () => Boolean(getToken());

export const setAuthToken = (token) => {
  if (token) {
    localStorage.setItem('token', token);
  }
};

export const logout = () => {
  localStorage.removeItem('token');
};
