add sync npub logic & change perms and activity history design & add delete app/perm requests

This commit is contained in:
Bekbolsun
2024-02-01 18:33:19 +06:00
parent 0b07b78b5c
commit e5d2b8808b
47 changed files with 1084 additions and 596 deletions

23
src/hooks/useIsIOS.ts Normal file
View File

@@ -0,0 +1,23 @@
import { useState, useEffect } from 'react'
/**
* Custom hook to detect if the platform is iOS or not.
* @returns {boolean} True if the platform is iOS, false otherwise.
*/
const iOSRegex = /iPad|iPhone|iPod/
function useIsIOS() {
const [isIOS, setIsIOS] = useState(false)
useEffect(() => {
const isIOSUserAgent =
iOSRegex.test(navigator.userAgent) ||
(navigator.userAgent.includes('Mac') && 'ontouchend' in document)
setIsIOS(isIOSUserAgent)
}, [])
return isIOS
}
export default useIsIOS