fix: use instance.data instead of profile.data.instance, fix SSR handoff crash
This commit is contained in:
8 files changed
+46
-15
No files matched your search
@@ -57,6 +57,7 @@
|
||||
import RelativeDate, {
|
||||
formatRelativeDate,
|
||||
} from '$lib/components/util/RelativeDate.svelte'
|
||||
import { instance } from '$lib/instance.svelte'
|
||||
|
||||
let editing = $state(false)
|
||||
let saving = $state(false)
|
||||
@@ -327,12 +328,12 @@
|
||||
onclick={() => {
|
||||
navigator.share?.({
|
||||
url: localShare
|
||||
? `${instanceToURL(profile.data.instance)}/post/${post.post.id}`
|
||||
? `${instanceToURL(instance.data)}/post/${post.post.id}`
|
||||
: post.post.ap_id,
|
||||
}) ??
|
||||
navigator.clipboard.writeText(
|
||||
localShare
|
||||
? `${instanceToURL(profile.data.instance)}/post/${post.post.id}`
|
||||
? `${instanceToURL(instance.data)}/post/${post.post.id}`
|
||||
: post.post.ap_id,
|
||||
)
|
||||
toast({ content: $t('toast.copied') })
|
||||
|
||||
Reference in new issue
Block a user