23 lines
608 B
TypeScript
23 lines
608 B
TypeScript
|
|
import {UserType} from "@/types/UserType";
|
||
|
|
import {FC} from "react";
|
||
|
|
import {DishType} from "@/types/DishType";
|
||
|
|
|
||
|
|
interface Props {
|
||
|
|
user: UserType,
|
||
|
|
dish: DishType,
|
||
|
|
}
|
||
|
|
|
||
|
|
const DishCard: FC<Props> = ({ user, dish }: Props) => {
|
||
|
|
return (
|
||
|
|
<div className="w-full flex py-2 text-xl font-bold text-primary">
|
||
|
|
<div className="user-badge flex-none w-16 text-center pr-5">
|
||
|
|
{ user.name.slice(0, 1) }
|
||
|
|
</div>
|
||
|
|
<div className="dish-name flex-1">
|
||
|
|
{ dish ? dish.name : '-' }
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
)
|
||
|
|
}
|
||
|
|
|
||
|
|
export default DishCard
|