add spinner (#394)

Co-authored-by: Terence Ho <>
pull/396/head
Terence 2 years ago committed by GitHub
parent 2f12a900e6
commit d8213639d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -8,7 +8,7 @@ import {
} from '@heroicons/react/20/solid'; } from '@heroicons/react/20/solid';
import { FaceSmileIcon } from '@heroicons/react/24/outline'; import { FaceSmileIcon } from '@heroicons/react/24/outline';
import { Vote } from '@prisma/client'; import { Vote } from '@prisma/client';
import { Button, TextArea } from '@tih/ui'; import { Button, Spinner, TextArea } from '@tih/ui';
import { trpc } from '~/utils/trpc'; import { trpc } from '~/utils/trpc';
@ -212,11 +212,9 @@ export default function ResumeCommentListItem({
)} )}
/> />
</button> </button>
<div className="text-xs"> <div className="text-xs">
{commentVotesQuery.data?.numVotes ?? 0} {commentVotesQuery.data?.numVotes ?? 0}
</div> </div>
<button <button
disabled={ disabled={
!userId || !userId ||
@ -245,6 +243,12 @@ export default function ResumeCommentListItem({
Edit Edit
</button> </button>
)} )}
{(commentVotesQuery.isLoading ||
commentVotesUpsertMutation.isLoading ||
commentVotesDeleteMutation.isLoading) && (
<Spinner label="loading votes..." size="xs" />
)}
</div> </div>
</div> </div>
</div> </div>

Loading…
Cancel
Save