Did more work to beer post page, seed

Worked on comments and beer recs features. Fine tuning database seed amounts.
This commit is contained in:
Aaron William Po
2023-01-29 21:53:05 -05:00
parent fe277d5964
commit 0b96c8f1f5
38 changed files with 833 additions and 221 deletions

View File

@@ -0,0 +1,34 @@
import { FunctionComponent } from 'react';
import Link from 'next/link';
import BeerRecommendationQueryResult from '@/services/BeerPost/types/BeerReccomendationQueryResult';
interface BeerRecommendationsProps {
beerRecommendations: BeerRecommendationQueryResult[];
}
const BeerRecommendations: FunctionComponent<BeerRecommendationsProps> = ({
beerRecommendations,
}) => {
return (
<div className="card sticky top-2 h-full overflow-y-scroll bg-base-300">
<div className="card-body">
{beerRecommendations.map((beerPost) => (
<div key={beerPost.id} className="w-full">
<div>
<Link href={`/beers/${beerPost.id}`} className="link-hover">
<h2 className="text-2xl font-bold">{beerPost.name}</h2>
</Link>
<Link href={`/breweries/${beerPost.brewery.id}`} className="link-hover">
<p className="text-lg font-semibold">{beerPost.brewery.name}</p>
</Link>
</div>
<p>{beerPost.abv}% ABV</p>
<p>{beerPost.ibu} IBU</p>
</div>
))}
</div>
</div>
);
};
export default BeerRecommendations;