import LoggedInAvatarView from "@/components/LoggedInAvatarView";
import NotLoggedInAvatarView from "@/components/NotLoggedInAvatarView";

import { useSiteStore } from "@/state/Stores";
import { observer } from "mobx-react-lite";

export default observer(() => {
  const { isLoggedIn, siteAvatarID, siteAvatarName } = useSiteStore();

  if (isLoggedIn) {
    return (
      <LoggedInAvatarView avatarID={siteAvatarID} avatarName={siteAvatarName} />
    );
  }

  return <NotLoggedInAvatarView />;
});
