diff --git a/.vscode/.snippet.code-snippets b/.vscode/.snippet.code-snippets index f4961fc..a072b93 100644 --- a/.vscode/.snippet.code-snippets +++ b/.vscode/.snippet.code-snippets @@ -15,5 +15,27 @@ "`}" ], "description": "Log output to console" + }, + "React Functional Component": { + "scope": "typescriptreact", + "prefix": "rfc", + "body": [ + "import * as React from 'react';", + "import { FunctionComponent } from 'react';", + "", + "const $TM_FILENAME_BASE: FunctionComponent = () => {", + "\treturn (", + "\t\t
", + "\t\t\t$0", + "\t\t\t", + "\t\t
", + "\t);", + "}", + "", + "export default $TM_FILENAME_BASE;" + ], + "description": "Log output to console" } } \ No newline at end of file diff --git a/src/components/HeaderBar.tsx b/src/components/HeaderBar.tsx index 68c34c2..826c4c2 100644 --- a/src/components/HeaderBar.tsx +++ b/src/components/HeaderBar.tsx @@ -1,81 +1,10 @@ import * as React from "react"; -import { FunctionComponent } from "react"; -import { Menu, MenuItem } from "@szhsin/react-menu"; -import { MancalaGame } from "mancala.js"; -import { Context } from "../context/context"; -import { getColorByBrightness } from "../util/ColorUtil"; -import Button from "./Button"; -import "@szhsin/react-menu/dist/index.css"; -import "@szhsin/react-menu/dist/transitions/slide.css"; -//@ts-ignore -import MancalaIcon from "jsx:../mancala.svg"; +import { FunctionComponent } from "react";; -function renderNewGameButton( - context: Context, - game: MancalaGame | undefined, - onNewGameClick: () => void, - userKeyWhoLeave: string | undefined, - crashMessage: string | undefined): JSX.Element { - const newGame = ( -