mirror of
https://github.com/ruisaraiva19/favycon.git
synced 2026-09-12 19:51:07 +05:00
feat(errors): add vibration feedback on error messages (#242)
This commit is contained in:
parent
58f005de76
commit
e1fef2b4e3
@ -24,9 +24,12 @@ const Home: NextPage = () => {
|
||||
}
|
||||
}, [file])
|
||||
|
||||
const onError = (error: string) => {
|
||||
const onError = (message: string) => {
|
||||
setErrorCounter((c) => c + 1)
|
||||
setError(error)
|
||||
setError(message)
|
||||
if (message.length > 0 && navigator.vibrate) {
|
||||
navigator.vibrate(300)
|
||||
}
|
||||
}
|
||||
|
||||
const onGenerate = async (file: File, pwa: boolean, dark: boolean) => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user