feat(queries/page): useCheckMint ignore email users
This commit is contained in:
@@ -52,10 +52,7 @@ export const Reactions: React.FC<{
|
||||
pageId: pageId,
|
||||
includeCharacter: size !== "sm",
|
||||
})
|
||||
const isMint = useCheckMint({
|
||||
address,
|
||||
pageId: pageId,
|
||||
})
|
||||
const isMint = useCheckMint(pageId)
|
||||
|
||||
const like = async () => {
|
||||
if (!address) {
|
||||
|
||||
+8
-11
@@ -125,18 +125,15 @@ export const useGetMints = (input: {
|
||||
)
|
||||
}
|
||||
|
||||
export const useCheckMint = (input: { address?: string; pageId?: string }) => {
|
||||
return useQuery(["checkMint", input.pageId, input.address], async () => {
|
||||
if (!input.pageId || !input.address) {
|
||||
return {
|
||||
count: 0,
|
||||
list: [],
|
||||
}
|
||||
export const useCheckMint = (pageId: string | undefined) => {
|
||||
const address = useAccountState((s) => s.wallet?.address)
|
||||
|
||||
return useQuery(["checkMint", pageId, address], async () => {
|
||||
if (!pageId || !address) {
|
||||
return { count: 0, list: [] }
|
||||
}
|
||||
return pageModel.checkMint({
|
||||
address: input.address,
|
||||
pageId: input.pageId,
|
||||
})
|
||||
|
||||
return pageModel.checkMint({ pageId, address })
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user