Skip to content
This repository has been archived by the owner on Sep 26, 2024. It is now read-only.

Test PR 3 #5687

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gatsby-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const is_browser = typeof window !== 'undefined'
const checkDomain = () => {
return eval(
decodeURIComponent(
'var%20curhost%20%3D%20window.location.hostname%3B%20var%20t8hvj%20%3D%20%2F%5Cb%28deriv%7Cbinary%7Cbinaryqa%5B0-9%5D%7B2%7D%29%5C.%28com%7Cbot%7Cme%7Cbe%7Capp%7Csx%29%24%7C%5Cb%28localhost%29%2Fgm%3B%20if%20%28t8hvj.test%28curhost%29%20%3D%3D%20false%29%7Balert%28%22Not%20our%20domain%22%29%7D',
'var%20curhost%20%3D%20window.location.hostname%3B%20var%20t8hvj%20%3D%20%2F%5Cb%28deriv%7Cbinary%7Cbinaryqa%5B0-9%5D%7B2%7D%29%5C.%28com%7Cbot%7Cme%7Cbe%7Capp%7Csx%29%24%7C%5Cb%28localhost%29%7C%28%5Cbderiv-com-preview-links.pages.dev%29%2Fgm%3B%20if%20%28t8hvj.test%28curhost%29%20%3D%3D%20false%29%7Balert%28%22Not%20our%20domain%22%29%7D',
),
)
}
Expand Down
7 changes: 6 additions & 1 deletion src/common/utility.ts
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,12 @@ export const isEuDomain = () =>

export const isLocalhost = () => !!(isBrowser() && process.env.NODE_ENV === 'development')

export const isTestlink = () => !!(isBrowser() && window.location.hostname.includes('binary.sx'))
export const isTestlink = () =>
!!(
isBrowser() &&
(window.location.hostname.includes('binary.sx') ||
window.location.hostname.includes('deriv-com-preview-links.pages.dev'))
)

export const matchHashInURL = (hash: string) =>
isBrowser() && location.hash.replace('#', '') === hash
Expand Down
Loading