mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-02-16 20:13:49 +00:00
Add date established to brewery page
This commit is contained in:
@@ -2,7 +2,7 @@ import UserContext from '@/contexts/userContext';
|
||||
import useGetBreweryPostLikeCount from '@/hooks/useGetBreweryPostLikeCount';
|
||||
import BreweryPostQueryResult from '@/services/BreweryPost/types/BreweryPostQueryResult';
|
||||
import { FC, useContext } from 'react';
|
||||
import { Link } from 'react-daisyui';
|
||||
import Link from 'next/link';
|
||||
import { z } from 'zod';
|
||||
import Image from 'next/image';
|
||||
import BreweryPostLikeButton from './BreweryPostLikeButton';
|
||||
@@ -24,17 +24,26 @@ const BreweryCard: FC<{ brewery: z.infer<typeof BreweryPostQueryResult> }> = ({
|
||||
/>
|
||||
)}
|
||||
</figure>
|
||||
<div className="card-body space-y-3">
|
||||
<div className="card-body">
|
||||
<div>
|
||||
<h2 className="text-3xl font-bold">
|
||||
<Link href={`/breweries/${brewery.id}`}>{brewery.name}</Link>
|
||||
<h2 className="mb-2 text-2xl font-bold lg:text-3xl">
|
||||
<Link href={`/breweries/${brewery.id}`} className="link-hover link">
|
||||
{brewery.name}
|
||||
</Link>
|
||||
</h2>
|
||||
<h3 className="text-xl font-semibold">{brewery.location}</h3>
|
||||
<h3 className="text-xl font-normal lg:text-2xl">
|
||||
located in {brewery.location}
|
||||
</h3>
|
||||
<h4 className="text-lg lg:text-xl">
|
||||
est. {brewery.dateEstablished.getFullYear()}
|
||||
</h4>
|
||||
</div>
|
||||
<div className="flex justify-between">
|
||||
<span>liked by {likeCount} users</span>
|
||||
{user && (
|
||||
<BreweryPostLikeButton breweryPostId={brewery.id} mutateCount={mutate} />
|
||||
)}
|
||||
</div>
|
||||
liked by {likeCount} users
|
||||
{user && (
|
||||
<BreweryPostLikeButton breweryPostId={brewery.id} mutateCount={mutate} />
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user