overleaf/services/web/frontend/js/shared/components/location.js
Alf Eaton 9729befe59 Merge pull request #18170 from overleaf/ae-token-access-page
Convert token access page to React

GitOrigin-RevId: d7434f0de395c47a95d00767727fbe9d43f9abca
2024-05-03 08:05:01 +00:00

16 lines
440 B
JavaScript

// window location-related functions in a separate module so they can be mocked/stubbed in tests
export const location = {
assign(url) {
// eslint-disable-next-line no-restricted-syntax
window.location.assign(url)
},
replace(url) {
// eslint-disable-next-line no-restricted-syntax
window.location.replace(url)
},
reload() {
// eslint-disable-next-line no-restricted-syntax
window.location.reload()
},
}