import { CSSProperties, Component } from "react"; /* import axios from "axios"; */ import { LogoDark } from "../components/logo"; import Home from '@material-ui/icons/Home'; import VideogameAssetIcon from '@material-ui/icons/VideogameAsset'; import ExtensionIcon from '@material-ui/icons/Extension'; import SearchIcon from '@material-ui/icons/Search'; import SettingsIcon from '@material-ui/icons/Settings'; import PersonIcon from '@material-ui/icons/Person'; import {AccountAvatar} from "./account"; var NavBarItemStyle: CSSProperties = { margin: 12, marginBottom: 16, display: "block" } export class NavBar extends Component { state: { loggedIn: boolean } = { loggedIn: false } constructor(props: {}) { super(props); if (typeof window === "undefined") return; // return if run on server this.state.loggedIn = document.cookie.includes("token"); } render () { return
{ this.state.loggedIn ? : }
} }