mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2025-12-13 07:46:10 +00:00
fix(lib): fix missing secret bug (#430)
This commit is contained in:
parent
2ee10f0f55
commit
8391532d83
@ -33,9 +33,10 @@ export const useNavigationUrl = (coordinates?: [number, number]) => {
|
|||||||
export const useShareLogic = (item?: Item) => {
|
export const useShareLogic = (item?: Item) => {
|
||||||
const shareUrl = window.location.href
|
const shareUrl = window.location.href
|
||||||
const shareTitle = item?.name ?? 'Utopia Map Item'
|
const shareTitle = item?.name ?? 'Utopia Map Item'
|
||||||
const inviteLink = item?.secrets
|
const inviteLink =
|
||||||
? `${window.location.origin}/invite/${item.secrets[0].secret}`
|
item?.secrets && item.secrets.length > 0
|
||||||
: shareUrl
|
? `${window.location.origin}/invite/${item.secrets[0].secret}`
|
||||||
|
: shareUrl
|
||||||
|
|
||||||
const copyLink = () => {
|
const copyLink = () => {
|
||||||
navigator.clipboard
|
navigator.clipboard
|
||||||
|
|||||||
@ -85,7 +85,9 @@ export function HeaderView({
|
|||||||
onConfirm={deleteCallback ?? (() => undefined)}
|
onConfirm={deleteCallback ?? (() => undefined)}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<QRModal item={item} isOpen={qrModalOpen} onClose={() => setQrModalOpen(false)} />
|
{showQrButton && (
|
||||||
|
<QRModal item={item} isOpen={qrModalOpen} onClose={() => setQrModalOpen(false)} />
|
||||||
|
)}
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user