import { CopyBlock, dracula } from "react-code-blocks";
import { Link } from "react-router-dom";
import { useAuthContext } from "../context/auth_context";
export const Home = () => {
const { player, signedIn } = useAuthContext();
if (signedIn) {
const sshConfig = `Host chessh
Hostname ${process.env.REACT_APP_SSH_SERVER}
Port ${process.env.REACT_APP_SSH_PORT}
User "${player?.username}"
PubkeyAuthentication yes`;
return (
<>
Welcome, {player?.username}
Getting Started
Consider joining the{" "}
CheSSH Discord{" "}
to receive notifications when other players are looking for
opponents, or when it is your move in a game.
Add a public key, or{" "}
set a password.
Insert the following block in your{" "}
ssh config:
Then, connect with:
Finally, play chess! Ideally, keeping the following contols in
mind:
Ctrl + b / Escape to return to the main menu.
Ctrl + c / Ctrl + d to exit CheSSH at any point.
Arrow keys to move around the board.
Select a piece with "enter", and move it to a square by pressing
"enter" again.