Change alarm sound toast

Closes #137
This commit is contained in:
Brandon Presley 2022-12-28 14:15:02 +13:00
parent b33a829816
commit 2c6a773548
1 changed files with 7 additions and 7 deletions

View File

@ -69,6 +69,12 @@ export default function SettingsPage() {
}, []),
)
const soundString = useMemo(() => {
if (!sound) return null
const split = sound.split('/')
return split.pop()
}, [sound])
const changeAlarmEnabled = useCallback(
(enabled: boolean) => {
if (enabled)
@ -99,7 +105,7 @@ export default function SettingsPage() {
if (!fileCopyUri) return
settingsRepo.update({}, {sound: fileCopyUri})
setSound(fileCopyUri)
toast('This song will now play after rest timers complete.')
toast('Sound will play after rest timers.')
}, [])
const changeNotify = useCallback((enabled: boolean) => {
@ -168,12 +174,6 @@ export default function SettingsPage() {
setDate(value)
}, [])
const soundString = useMemo(() => {
if (!sound) return null
const split = sound.split('/')
return split.pop()
}, [sound])
const changeDarkColor = useCallback(
(value: string) => {
setDarkColor(value)