import React, {
FunctionComponent,
useContext,
} from 'react';
import Honeycomb from './honeycomb';
import { isPangram } from './scoring';
import { StoreContext } from './store';
const GameView: FunctionComponent = () => {
const { dispatch, state } = useContext(StoreContext);
const {
currentWord,
letters,
score,
words,
} = state;
return (
<>
{words.length === 0 && (
Your words...
)}
{words.map((word) => (
{word}
))}
{currentWord.split('').map((ch, i) => (
{ch}
))}
|
>
);
};
export default GameView;