Skip to content

Commit

Permalink
Add loading moderation
Browse files Browse the repository at this point in the history
  • Loading branch information
teodorus-nathaniel committed Jun 15, 2024
1 parent 01d823c commit 32f4968
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/extensions/common/CommonChatItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ export default function CommonChatItem({
}: CommonChatItemProps) {
const myAddress = useMyMainAddress()
const { isAuthorized } = useAuthorizedForModeration(myAddress ?? '')
const { mutate: moderate } = useModerateWithSuccessToast(message.id)
const { mutate: moderate, isLoading: loadingModeration } =
useModerateWithSuccessToast(message.id)
const { data: reasons } = getModerationReasonsQuery.useQuery(null)
const firstReasonId = reasons?.[0].id

Expand Down Expand Up @@ -255,6 +256,7 @@ export default function CommonChatItem({
<div className='px-2 pb-1 pt-2'>
<Button
variant='redOutline'
isLoading={loadingModeration}
onClick={(e) => {
e.stopPropagation()
moderate({
Expand Down

0 comments on commit 32f4968

Please sign in to comment.