import * as React from "react"; import { FunctionComponent } from "react"; import { Link } from "react-router-dom"; import { useTranslation } from "react-i18next"; import { RULES } from "@mancala/core"; import RuleBoard from "./RuleBoard"; // Every rule in order with its text and example (docs/specs/tutorial, R1). `showLessons` adds a link to each lesson; // left out where following it would leave a game. const RulesView: FunctionComponent<{ showLessons?: boolean }> = ({ showLessons }) => { const { t } = useTranslation(); return (
{t(key)}
)} {rule.example &&