Files
MauMau-Client/src/layout/components/Hand.tsx
DTieman 4ae1538552
All checks were successful
Build Mau & Deploy Mau / build (push) Successful in 1m25s
Build Mau & Deploy Mau / deploy (push) Successful in 3m49s
Updated front-end to match back-end rewrite
2024-05-05 17:08:20 +02:00

28 lines
696 B
TypeScript

import React, {FunctionComponent} from 'react';
import Card from "./Card";
interface Props {
hand: string[];
actionOnClick?: (cardString: string) => void;
isHidden?: boolean;
}
const Hand: FunctionComponent<Props> = ({hand, actionOnClick, isHidden}) => {
return (
<ul className="hand">
{
hand.map((card, index) => {
return (
<li key={card} className={"hand__item"}>
<Card cardString={card} handleClick={actionOnClick} isHidden={isHidden}/>
</li>
)
})
}
</ul>
)
}
export default Hand;