Create location table for brewery post locations

This commit is contained in:
Aaron William Po
2023-04-26 08:37:59 -04:00
parent 4aeafc0de8
commit c19cddceb7
17 changed files with 209 additions and 55 deletions

View File

@@ -44,7 +44,9 @@ const BeerCard: FC<{ post: z.infer<typeof beerPostQueryResult> }> = ({ post }) =
<span className="text-sm lg:text-lg">{post.abv}% ABV</span>
<span className="text-sm lg:text-lg">{post.ibu} IBU</span>
</div>
<span>liked by {likeCount} users</span>
<span>
liked by {likeCount} user{likeCount === 1 ? '' : 's'}
</span>
</div>
<div>
{user && <BeerPostLikeButton beerPostId={post.id} mutateCount={mutate} />}

View File

@@ -32,7 +32,8 @@ const BreweryCard: FC<{ brewery: z.infer<typeof BreweryPostQueryResult> }> = ({
</Link>
</h2>
<h3 className="text-xl font-normal lg:text-2xl">
located in {brewery.city}, {brewery.stateOrProvince || brewery.country}
located in {brewery.location.city},{' '}
{brewery.location.stateOrProvince || brewery.location.country}
</h3>
<h4 className="text-lg lg:text-xl">
est. {brewery.dateEstablished.getFullYear()}