import * as React from "react"; import { Button, Classes, Dialog } from "@blueprintjs/core"; import { IconNames } from "@blueprintjs/icons"; import { ConnectedRouter } from "connected-react-router"; import { Route } from "react-router-dom"; import { Nav } from "./components/organisms/"; import { AboutScreen, GraphScreen } from "./components/screens/"; import { DESKTOP_WIDTH_THRESHOLD } from "./constants"; import { history } from "./index"; interface IAppLocalState { mobileDialogOpen: boolean; } export class AppRouter extends React.Component<{}, IAppLocalState> { constructor(props: {}) { super(props); this.state = { mobileDialogOpen: false }; } public render() { return (
); } public componentDidMount() { if (window.innerWidth < DESKTOP_WIDTH_THRESHOLD) { this.handleMobileDialogOpen(); } } private renderMobileDialog = () => { return (

fediverse.space is optimized for desktop computers. Feel free to check it out on your phone (ideally in landscape mode) but for best results, open it on a computer.

); }; private handleMobileDialogOpen = () => { this.setState({ mobileDialogOpen: true }); }; private handleMobileDialogClose = () => { this.setState({ mobileDialogOpen: false }); }; }