Refactoring beer by id page, add delete comment

Refactored the comments ui into various new components, added the delete beer comment by id feature.
This commit is contained in:
Aaron William Po
2023-03-03 21:19:18 -05:00
parent 4a6e10572c
commit 472ead9abd
16 changed files with 331 additions and 136 deletions

View File

@@ -7,7 +7,7 @@ import withPageAuthRequired from '@/getServerSideProps/withPageAuthRequired';
import getBeerPostById from '@/services/BeerPost/getBeerPostById';
import { BeerPostQueryResult } from '@/services/BeerPost/schema/BeerPostQueryResult';
import EditBeerPostForm from '@/components/EditBeerPostForm';
import FormPageLayout from '@/components/ui/forms/BeerPostFormPageLayout';
import FormPageLayout from '@/components/ui/forms/FormPageLayout';
import { BiBeer } from 'react-icons/bi';
interface EditPageProps {
@@ -24,7 +24,12 @@ const EditPage: NextPage<EditPageProps> = ({ beerPost }) => {
<meta name="description" content={pageTitle} />
</Head>
<FormPageLayout headingText={pageTitle} headingIcon={BiBeer}>
<FormPageLayout
headingText={pageTitle}
headingIcon={BiBeer}
backLink={`/beers/${beerPost.id}`}
backLinkText={`Back to "${beerPost.name}"`}
>
<EditBeerPostForm
previousValues={{
name: beerPost.name,