text: const clearLocalStorage = () => {
      window.localStorage.clear();
  };
  
  const setToken = token => {
      window.localStorage.setItem("token", token);
  };
  
  const setAuthenticatedUser = (data) => {
      window.localStorage.setItem("id", data.id);
      window.localStorage.setItem("email", data.email);
      window.localStorage.setItem("name", data.name);
      window.localStorage.setItem("role", data.role);
      window.localStorage.setItem("role_name", data.role_name);
      window.localStorage.setItem("faculty_id", data.faculty_id);
      window.localStorage.setItem("faculty_name", data.faculty_name);
      window.localStorage.setItem("signature", data.signature);
  }
  
  const getRoleName = () => {
      return window.localStorage.getItem("role_name");
  }
  
  const getName = () => {
      return window.localStorage.getItem("name");
  }
  
  const getSignature = () => {
      return window.localStorage.getItem("signature");
  }
  
  const getEmail = () => {
      return window.localStorage.getItem("email");
  }
  
  const getFacultyName = () => {
      return window.localStorage.getItem("faculty_name");
  }
  
  const getToken = () => {
      return window.localStorage.getItem("token");
  };
  
  const handleRoutes = (data) => {
      data = data.data;
      if(data.role == 0){
          return "/superadmin";
      }else if(data.role == 1){
          return "/wadek";
      }else if(data.role == 2){
          return "/staff";
      }
  }
  
  export {
      clearLocalStorage,
      setToken,
      getToken,
      handleRoutes,
      setAuthenticatedUser,
      getRoleName,
      getSignature,
      getName,
      getEmail,
      getFacultyName
  };