import UserAccountButton from "./user_account_button";
import { LoginForm }  from "./forms/login_form";
import Token from "../lib/token";
import { refreshIfExpired, isUserAuthenticated } from "../lib/session";
import UserAccountDropdownMenu from "./user_account_dropdown_menu";

export default function MainPageDropdownMenu() {
  const token = new Token();

  if(token.present()) {
    return (
      <>
        <UserAccountButton token={token}/>
        <UserAccountDropdownMenu/>
      </>
    );
  }

  return (
    <>
      <UserAccountButton token={token}/>
      <LoginForm/>
    </>
  );
}