Merge pull request #22475 from overleaf/rh-student-hurdle

[web] Add friction to student plans

GitOrigin-RevId: 506f1e96a8430069ba5e9f7bfd6c709124e7857c
This commit is contained in:
M Fahru
2025-01-24 09:05:48 +00:00
committed by Copybot
parent 36c9772e0e
commit 7af423173c
7 changed files with 49 additions and 0 deletions
@@ -0,0 +1,7 @@
// window.history-related functions in a separate module so they can be mocked/stubbed in tests
export const history = {
pushState(data: any, unused: string, url?: string | URL | null) {
window.history.pushState(data, unused, url)
},
}
@@ -1,6 +1,10 @@
// window location-related functions in a separate module so they can be mocked/stubbed in tests
export const location = {
get href() {
// eslint-disable-next-line no-restricted-syntax
return window.location.href
},
assign(url) {
// eslint-disable-next-line no-restricted-syntax
window.location.assign(url)