type AuthState = {
  token: string | null;
  username: string | null;
};

const state: AuthState = {
  token: null,
  username: null,
};

export const authStore = {
  setToken(token: string | null) {
    state.token = token;
  },
  setUsername(username: string | null) {
    state.username = username;
  },
  getToken() {
    return state.token;
  },
  getUsername() {
    return state.username;
  },
};

