parent
b33a829816
commit
2c6a773548
|
@ -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(
|
const changeAlarmEnabled = useCallback(
|
||||||
(enabled: boolean) => {
|
(enabled: boolean) => {
|
||||||
if (enabled)
|
if (enabled)
|
||||||
|
@ -99,7 +105,7 @@ export default function SettingsPage() {
|
||||||
if (!fileCopyUri) return
|
if (!fileCopyUri) return
|
||||||
settingsRepo.update({}, {sound: fileCopyUri})
|
settingsRepo.update({}, {sound: fileCopyUri})
|
||||||
setSound(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) => {
|
const changeNotify = useCallback((enabled: boolean) => {
|
||||||
|
@ -168,12 +174,6 @@ export default function SettingsPage() {
|
||||||
setDate(value)
|
setDate(value)
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
const soundString = useMemo(() => {
|
|
||||||
if (!sound) return null
|
|
||||||
const split = sound.split('/')
|
|
||||||
return split.pop()
|
|
||||||
}, [sound])
|
|
||||||
|
|
||||||
const changeDarkColor = useCallback(
|
const changeDarkColor = useCallback(
|
||||||
(value: string) => {
|
(value: string) => {
|
||||||
setDarkColor(value)
|
setDarkColor(value)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user