mirror of
https://github.com/rjNemo/meal_planner
synced 2026-06-11 12:56:40 +00:00
41 lines
1.1 KiB
JavaScript
41 lines
1.1 KiB
JavaScript
import React from "react";
|
|
import { Link, useRouteMatch } from "react-router-dom";
|
|
|
|
const CategoryEntry = ({ category }) => {
|
|
const {
|
|
strCategory,
|
|
strCategoryThumb
|
|
// strCategoryDescription
|
|
} = category;
|
|
|
|
const { url } = useRouteMatch();
|
|
|
|
return (
|
|
// <CardEntry item={meal} />
|
|
<Link to={`${url}/${strCategory}`}>
|
|
<li>
|
|
<div className="row">
|
|
<div className="col s12">
|
|
<div className="card horizontal hoverable">
|
|
<div className="card-image valign-wrapper">
|
|
<img
|
|
// className="responsive-img"
|
|
src={strCategoryThumb}
|
|
alt={strCategory}
|
|
/>
|
|
</div>
|
|
<div className="card-stacked">
|
|
<div className="card-content black-text">
|
|
<h2 className="logo">{strCategory}</h2>
|
|
{/* <p>{strCategoryDescription}</p> */}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</Link>
|
|
);
|
|
};
|
|
|
|
export default CategoryEntry;
|