diff --git a/components/BeerById/BeerCommentForm.tsx b/components/BeerById/BeerCommentForm.tsx index f85972d..3187ed5 100644 --- a/components/BeerById/BeerCommentForm.tsx +++ b/components/BeerById/BeerCommentForm.tsx @@ -1,10 +1,9 @@ import sendCreateBeerCommentRequest from '@/requests/sendCreateBeerCommentRequest'; -import { BeerCommentQueryResultArrayT } from '@/services/BeerComment/schema/BeerCommentQueryResult'; import BeerCommentValidationSchema from '@/services/BeerComment/schema/CreateBeerCommentValidationSchema'; import { BeerPostQueryResult } from '@/services/BeerPost/schema/BeerPostQueryResult'; import { zodResolver } from '@hookform/resolvers/zod'; import { useRouter } from 'next/router'; -import { Dispatch, SetStateAction, FunctionComponent, useState, useEffect } from 'react'; +import { FunctionComponent, useState, useEffect } from 'react'; import { Rating } from 'react-daisyui'; import { useForm, SubmitHandler } from 'react-hook-form'; import { z } from 'zod'; @@ -18,7 +17,6 @@ import FormTextArea from '../ui/forms/FormTextArea'; interface BeerCommentFormProps { beerPost: BeerPostQueryResult; - setComments: Dispatch>; } const BeerCommentForm: FunctionComponent = ({ beerPost }) => { diff --git a/components/BeerById/BeerPostCommentsSection.tsx b/components/BeerById/BeerPostCommentsSection.tsx index 6a61623..a0824ba 100644 --- a/components/BeerById/BeerPostCommentsSection.tsx +++ b/components/BeerById/BeerPostCommentsSection.tsx @@ -9,14 +9,13 @@ import CommentCard from './CommentCard'; interface BeerPostCommentsSectionProps { beerPost: BeerPostQueryResult; - setComments: React.Dispatch>; comments: BeerCommentQueryResultArrayT; commentsPageCount: number; } const BeerPostCommentsSection: FC = ({ beerPost, - setComments, + comments, commentsPageCount, }) => { @@ -30,7 +29,7 @@ const BeerPostCommentsSection: FC = ({
{user ? ( - + ) : (
Log in to leave a comment. diff --git a/components/BeerIndex/BeerIndexPaginationBar.tsx b/components/BeerIndex/BeerIndexPaginationBar.tsx new file mode 100644 index 0000000..c90217c --- /dev/null +++ b/components/BeerIndex/BeerIndexPaginationBar.tsx @@ -0,0 +1,34 @@ +import Link from 'next/link'; + +import { FC } from 'react'; + +interface PaginationProps { + pageNum: number; + pageCount: number; +} + +const BeerIndexPaginationBar: FC = ({ pageCount, pageNum }) => { + return ( +
+ + « + + + + » + +
+ ); +}; + +export default BeerIndexPaginationBar; diff --git a/components/BeerIndex/Pagination.tsx b/components/BeerIndex/Pagination.tsx deleted file mode 100644 index dc18fb8..0000000 --- a/components/BeerIndex/Pagination.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import { useRouter } from 'next/router'; -import { FC } from 'react'; - -interface PaginationProps { - pageNum: number; - pageCount: number; -} - -const Pagination: FC = ({ pageCount, pageNum }) => { - const router = useRouter(); - - return ( -
- - - -
- ); -}; - -export default Pagination; diff --git a/components/ui/Navbar.tsx b/components/ui/Navbar.tsx index 4803717..a329b6b 100644 --- a/components/ui/Navbar.tsx +++ b/components/ui/Navbar.tsx @@ -44,7 +44,7 @@ const Navbar = () => { return (
-
-