Merge pull request #19217 from overleaf/jpa-window-cleanup

[web] migrate newly added window attribute to getMeta

GitOrigin-RevId: d3ef79216b4963c9f5f2f7e94e448b27970e3d8f
This commit is contained in:
Jakob Ackermann 2024-07-03 10:44:56 +02:00 committed by Copybot
parent 37155e78be
commit 22a4e5fd90

View file

@ -14,6 +14,7 @@ import { sendMB } from '../../../../infrastructure/event-tracking'
import { getJSON } from '../../../../infrastructure/fetch-json' import { getJSON } from '../../../../infrastructure/fetch-json'
import useAbortController from '@/shared/hooks/use-abort-controller' import useAbortController from '@/shared/hooks/use-abort-controller'
import { debugConsole } from '@/utils/debugging' import { debugConsole } from '@/utils/debugging'
import getMeta from '@/utils/meta'
export default function LinkSharing() { export default function LinkSharing() {
const [inflight, setInflight] = useState(false) const [inflight, setInflight] = useState(false)
@ -273,7 +274,7 @@ function AccessToken({ token, tokenHashPrefix, path, tooltipId }) {
let origin = window.location.origin let origin = window.location.origin
if (isAdmin) { if (isAdmin) {
origin = window.ExposedSettings.siteUrl origin = getMeta('ol-ExposedSettings').siteUrl
} }
const link = `${origin}${path}${token}${ const link = `${origin}${path}${token}${
tokenHashPrefix ? `#${tokenHashPrefix}` : '' tokenHashPrefix ? `#${tokenHashPrefix}` : ''