Add a placeholder creature page.

pull/4/head
Atul Varma 2021-02-15 08:34:22 -05:00
rodzic f908ab253d
commit 2384d1eac3
2 zmienionych plików z 26 dodań i 0 usunięć

Wyświetl plik

@ -2,9 +2,11 @@ import React from "react";
import ReactDOM from "react-dom";
import { WavesPage } from "./pages/waves-page";
import { VocabularyPage } from "./pages/vocabulary-page";
import { CreaturePage } from "./pages/creature-page";
const Pages = {
vocabulary: VocabularyPage,
creature: CreaturePage,
waves: WavesPage,
};

Wyświetl plik

@ -0,0 +1,24 @@
import React from "react";
import { Random } from "../random";
import { SvgVocabulary } from "../svg-vocabulary";
export const CreaturePage: React.FC<{}> = () => {
const rand = new Random(1);
const parts: string[] = [];
for (let i = 0; i < 5; i++) {
parts.push(rand.choice(SvgVocabulary).name);
}
return (
<>
<h1>Creature!</h1>
<p>TODO: Make a creature with maybe the following parts:</p>
<ul>
{parts.map((name, i) => (
<li key={i}>{name}</li>
))}
</ul>
</>
);
};