mirror of
https://github.com/ManInDark/HabitTrove.git
synced 2026-01-21 06:34:30 +01:00
fix redeem link
This commit is contained in:
10
lib/utils.ts
10
lib/utils.ts
@@ -286,4 +286,14 @@ export const playSound = (soundPath: string = '/sounds/timer-end.wav') => {
|
||||
audio.play().catch(error => {
|
||||
console.error('Error playing sound:', error)
|
||||
})
|
||||
}
|
||||
|
||||
// open a new window (client side only, must be run in browser)
|
||||
export const openWindow = (url: string): boolean => {
|
||||
const newWindow = window.open(url, '_blank')
|
||||
if (newWindow === null) {
|
||||
// Popup was blocked
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
Reference in New Issue
Block a user