// Header functionality

import { Alpine } from "./alpine";

const logout = (): void => {
  localStorage.removeItem("token");
  localStorage.removeItem("user");
  window.location.href = "/";
};

export { logout };

Alpine.data("header", () => ({
  logout,
}));
