Add create beer, beer post page

This commit is contained in:
Aaron William Po
2023-01-24 21:03:31 -05:00
parent 972846f5a8
commit d0bced1376
12 changed files with 264 additions and 40 deletions

View File

@@ -96,7 +96,7 @@ export const getServerSideProps: GetServerSideProps<BeerPageProps> = async (cont
const pageNumber = parseInt(query.page_num as string, 10) || 1;
const pageSize = 24;
const pageSize = 12;
const numberOfPosts = await DBClient.instance.beerPost.count();
const pageCount = numberOfPosts ? Math.ceil(numberOfPosts / pageSize) : 0;