import { Cuisine, Location, PRICE } from "@prisma/client"; import Link from "next/link"; export default async function SearchSideBar({ locations, cuisines, searchParams }: { locations: Location[]; cuisines: Cuisine[]; searchParams: {city?: string, location?: string, cuisine?: string, price: PRICE} }) { console.log("cuisines: ", cuisines); console.log("locations: ", locations); const priceStyle = "border w-full text-reg font-light p-2 text-center" const prices = [ {label: "$", price: PRICE.CHEAP, className: `${priceStyle} rounded-l`}, {label: "$$", price: PRICE.REGULAR, className: `${priceStyle} `}, {label: "$$$", price: PRICE.EXPENSIVE, className: `${priceStyle} rounded-r`} ]; return (

Region

{locations.map((location, index) => ( {location.name} ))}

Cuisine

{cuisines.map((cuisine, index) => ( {cuisine.name} ))}

Price

{ prices.map(({price, label, className}) => ( {label} )) }
); }