-
-
Notifications
You must be signed in to change notification settings - Fork 364
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10907 from hassnian/main
fix: bad quality genart Image downloading & NFT with gif not animating
- Loading branch information
Showing
4 changed files
with
62 additions
and
25 deletions.
There are no files selected for viewing
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
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,22 @@ | ||
import { useEventListener } from '@vueuse/core' | ||
|
||
type KodaHashEventType = 'kodahash/render/completed' | ||
|
||
type KodasHashEvent = { | ||
type: KodaHashEventType | ||
payload: { | ||
hash: string | ||
image: string | ||
type: string | ||
search: string | ||
attributes: unknown[] | ||
} | ||
} | ||
|
||
export const onKodahashRenderCompleted = (callback: (event: KodasHashEvent) => void) => { | ||
useEventListener(window, 'message', (e: MessageEvent<KodasHashEvent>) => { | ||
if (e.data?.type === 'kodahash/render/completed' && e.data.payload) { | ||
callback(e.data) | ||
} | ||
}) | ||
} |