-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b09e543
commit 9b692c1
Showing
6 changed files
with
83 additions
and
24 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -374,7 +374,7 @@ function ApproveButton({ | |
}) | ||
}} | ||
> | ||
Approve | ||
Approve user | ||
</Button> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import Check from '@/assets/emojis/check.png' | ||
import Time from '@/assets/emojis/time.png' | ||
import { MIN_MEME_FOR_REVIEW } from '@/constants/chat' | ||
import { getTokenomicsMetadataQuery } from '@/services/datahub/content-staking/query' | ||
import { getUnapprovedMemesCountQuery } from '@/services/datahub/posts/query' | ||
import { useMyMainAddress } from '@/stores/my-account' | ||
import Image from 'next/image' | ||
import Button from '../Button' | ||
import Modal, { ModalFunctionalityProps } from './Modal' | ||
|
||
export default function MemeOnReviewModal({ | ||
chatId, | ||
...props | ||
}: ModalFunctionalityProps & { chatId: string }) { | ||
const myAddress = useMyMainAddress() ?? '' | ||
const { data: tokenomics } = getTokenomicsMetadataQuery.useQuery(null) | ||
const { data: count } = getUnapprovedMemesCountQuery.useQuery( | ||
{ address: myAddress, chatId }, | ||
{ | ||
enabled: props.isOpen, | ||
} | ||
) | ||
const remaining = MIN_MEME_FOR_REVIEW - (count ?? 0) | ||
|
||
const description = | ||
remaining > 0 | ||
? `${tokenomics?.socialActionPrice.createCommentPoints} points have been used. We received your meme! We need at least ${remaining} more memes from you to mark you as a verified creator.` | ||
: `${ | ||
tokenomics?.socialActionPrice.createCommentPoints | ||
} points have been used. We received ${ | ||
count ?? 0 | ||
} meme from you! Now we need a bit of time to finish review you as a verified creator.` | ||
|
||
return ( | ||
<Modal {...props} title='Under Review' description={description}> | ||
<div className='flex flex-col items-center gap-6'> | ||
<Image | ||
src={remaining > 0 ? Time : Check} | ||
alt='' | ||
className='h-28 w-28' | ||
/> | ||
<Button className='w-full' size='lg' onClick={() => props.closeModal()}> | ||
Got it! | ||
</Button> | ||
</div> | ||
</Modal> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters