🌐 (notification) add i18n for notif
This commit is contained in:
@@ -3,6 +3,7 @@ import { StopwatchState } from '@/types/StopwatchState'
|
||||
import { notify } from '@/utils/notification'
|
||||
import { useInterval } from './useInterval'
|
||||
import { useWakeLock } from './useWakeLock'
|
||||
import i18n from '@/i18n'
|
||||
|
||||
const format = (num: number) => {
|
||||
return num.toString().padStart(2, '0')
|
||||
@@ -48,8 +49,8 @@ export const useTimer = () => {
|
||||
|
||||
const dev = isDev1Turn.value ? 'Dev 1' : 'Dev 2'
|
||||
|
||||
notify('Change!', {
|
||||
body: `${dev}, your turn!`
|
||||
notify(i18n.t('notification.change.title').toString(), {
|
||||
body: i18n.t('notification.change.body', { dev }).toString()
|
||||
})
|
||||
}
|
||||
}, 1000)
|
||||
|
||||
Reference in New Issue
Block a user