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 ( {/* We always want the GraphScreen to be rendered (since un- and re-mounting it is expensive */} {this.renderMobileDialog()} ); } 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 }); }; }
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.