fetch working

This commit is contained in:
2023-02-17 21:15:15 +02:00
parent a16fb30475
commit 30e4d512a6
2 changed files with 42 additions and 8 deletions
+11 -6
View File
@@ -1,24 +1,29 @@
import Link from "next/link";
import { RestaurantCardType } from "../page";
export default function RestaurantCard() {
interface Props {
restaurant: RestaurantCardType;
}
export default function RestaurantCard({restaurant}: Props) {
return (
<div className="w-64 h-72 m-3 rounded overflow-hidden border cursor-pointer">
<Link href="/restaurant/milestonesgrill">
<Link href={`/restaurant/${restaurant.slug}`}>
<img
src="https://resizer.otstatic.com/v2/photos/wide-huge/2/31852905.jpg"
src={restaurant.main_image}
alt=""
className="w-full h-36"
/>
<div className="p-1">
<h3 className="font-bold text-2xl mb-2">Milestones Grill</h3>
<h3 className="font-bold text-2xl mb-2">{restaurant.name}</h3>
<div className="flex items-start">
<div className="flex mb-2">*****</div>
<p className="ml-2">77 reviews</p>
</div>
<div className="flex text-reg font-light capitalize">
<p className=" mr-3">Mexican</p>
<p className=" mr-3">{restaurant.cuisine.name}</p>
<p className="mr-3">$$$$</p>
<p>Toronto</p>
<p>{restaurant.location.name}</p>
</div>
<p className="text-sm mt-1 font-bold">Booked 3 times today</p>
</div>