Update brewery/beer style to use tuples for ranges/coords. Seed updates.

This commit is contained in:
Aaron William Po
2023-09-22 02:17:05 -04:00
parent e95cb29189
commit 43220fe0e6
11 changed files with 37 additions and 17 deletions

View File

@@ -80,8 +80,10 @@ const BeerInfoHeader: FC<BeerInfoHeaderProps> = ({ beerPost }) => {
</Link>
</div>
<div>
<span className="mr-4 text-lg font-medium">{beerPost.abv}% ABV</span>
<span className="text-lg font-medium">{beerPost.ibu} IBU</span>
<span className="mr-4 text-lg font-medium">
{beerPost.abv.toFixed(1)}% ABV
</span>
<span className="text-lg font-medium">{beerPost.ibu.toFixed(1)} IBU</span>
</div>
<div>
{(!!likeCount || likeCount === 0) && (

View File

@@ -73,8 +73,8 @@ const BeerRecommendationsSection: FC<{
<span className="text-lg font-medium">{post.style.name}</span>
</div>
<div className="space-x-2">
<span>{post.abv}% ABV</span>
<span>{post.ibu} IBU</span>
<span>{post.abv.toFixed(1)}% ABV</span>
<span>{post.ibu.toFixed(1)} IBU</span>
</div>
</div>
</div>

View File

@@ -41,8 +41,8 @@ const BeerCard: FC<{ post: z.infer<typeof BeerPostQueryResult> }> = ({ post }) =
<div>
<p className="text-md lg:text-xl">{post.style.name}</p>
<div className="space-x-3">
<span className="text-sm lg:text-lg">{post.abv}% ABV</span>
<span className="text-sm lg:text-lg">{post.ibu} IBU</span>
<span className="text-sm lg:text-lg">{post.abv.toFixed(1)}% ABV</span>
<span className="text-sm lg:text-lg">{post.ibu.toFixed(1)} IBU</span>
</div>
{!isLoading && (
<span>

View File

@@ -15,6 +15,16 @@ const BeerStyleCard: FC<{ beerStyle: z.infer<typeof BeerStyleQueryResult> }> = (
<h3 className="link-hover link overflow-hidden whitespace-normal text-2xl font-bold lg:truncate lg:text-3xl">
{beerStyle.name}
</h3>
<div className="text-base-content text-sm">
ABV Range: <span>{beerStyle.abvRange[0].toFixed(1)}%</span>
<span> - </span>
<span>{beerStyle.abvRange[1].toFixed(1)}%</span>
</div>
<div className="text-base-content text-sm">
IBU Range: <span>{beerStyle.ibuRange[0].toFixed(1)}</span>
<span> - </span>
<span>{beerStyle.ibuRange[1].toFixed(1)}</span>
</div>
</Link>
</div>
</div>