Skip to content

Commit

Permalink
πŸ› Pre Appending First Comment after addition
Browse files Browse the repository at this point in the history
  • Loading branch information
sanmoh-hombal committed Aug 20, 2022
1 parent 069d88a commit f7efab8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion client/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ const App: React.FC = (): JSX.Element => {
<SocketProvider.SocketContext.Provider value={SocketProvider.socket}>
<div className="mx-auto my-40 px-8 py-4 sm:w-1/2">
<div className="text-xl font-bold text-center sm:text-left">Discussion</div>
<AthAddComment onComplete={_refreshComments} className="py-10 border-b" />
<AthAddComment
onComplete={(newComment: ICommentUserUpvote) => setComments([...new Set([newComment, ...comments])])}
className="py-10 border-b"
/>
<div className="py-10">
{comments.length > 0 &&
comments.map((comment: ICommentUserUpvote, index: number) => {
Expand Down

0 comments on commit f7efab8

Please sign in to comment.