import * as React from "react" import { RouteComponentProps } from "react-router" import { authenticate } from "../api" export const Home: React.FunctionComponent = (props) => { React.useEffect(() => { authenticate() .then(() => { // TEMP: Always redirect to VS Code. props.history.push("./vscode/") }) .catch(() => { props.history.push("./login/") }) }, []) return (
Welcome to code-server.
) }