Skip to content

Commit

Permalink
(Fix)-Fixed the scroll of Comment Section
Browse files Browse the repository at this point in the history
  • Loading branch information
parthksingh1 committed Nov 17, 2023
1 parent 43d08e1 commit 7a1cafb
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/Components/Shifting/CommentsSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const CommentSection = (props: CommentSectionProps) => {
className="mt-4 rounded-lg border border-gray-500 p-4 focus:ring-primary-500"
onChange={(e) => setCommentBox(e.target.value)}
/>
<div className="flex w-full justify-end">
<div className="mt-2 flex w-full justify-end">
<ButtonV2
className="mt-4"
onClick={async () => {
Expand All @@ -63,13 +63,15 @@ const CommentSection = (props: CommentSectionProps) => {
{t("post_your_comment")}
</ButtonV2>
</div>
<div className="w-full">
<PaginatedList.WhenLoading>
<CircularProgress />
</PaginatedList.WhenLoading>
<PaginatedList.Items<IComment>>
{(item) => <Comment {...item} />}
</PaginatedList.Items>
<div className="mt-2 w-full">
<div className="max-h-[400px] overflow-y-auto">
<PaginatedList.WhenLoading>
<CircularProgress />
</PaginatedList.WhenLoading>
<PaginatedList.Items<IComment>>
{(item) => <Comment {...item} />}
</PaginatedList.Items>
</div>
<div className="flex w-full items-center justify-center">
<PaginatedList.Paginator hideIfSinglePage />
</div>
Expand Down

0 comments on commit 7a1cafb

Please sign in to comment.