Make the prefetch supports typescript and opengraph.

 Use prefetch in Solarpass pfp
This commit is contained in:
2025-08-02 22:15:06 +08:00
parent be7d7536fc
commit 665538bdd3
11 changed files with 90 additions and 11 deletions

View File

@@ -175,11 +175,9 @@ const notFound = ref<boolean>(false)
const user = ref<any>(null)
async function fetchUser() {
// @ts-ignore
if (window.__APP_DATA__?.Account != null) {
if (window.DyPrefetch?.Account != null) {
console.log('[Fetch] Use the pre-rendered account data.')
// @ts-ignore
user.value = window.__APP_DATA__['Account']
user.value = window.DyPrefetch.Account
return
}