Update OIA page

This commit is contained in:
Caspian Zhao
2023-07-01 18:50:18 +08:00
committed by GitHub
parent 6388b21abf
commit fb7553050d
+11 -4
View File
@@ -5,7 +5,7 @@ import { useCallback, useEffect } from "react"
import { Image } from "~/components/ui/Image"
import { useTranslation } from "~/lib/i18n/client"
async function OIAPage() {
function OIAPage() {
const { t } = useTranslation("site")
useEffect(() => {
@@ -15,10 +15,17 @@ async function OIAPage() {
}
}, [])
const isAndroid = () => {
const userAgent = navigator.userAgent || navigator.vendor;
return /android/i.test(userAgent);
};
const download = useCallback(() => {
window.open(
"itms-apps://apps.apple.com/app/xlog-on-chain-blogging/id6449499296",
)
if(isAndroid()){
window.open("https://play.google.com/store/apps/details?id=com.crossbell.xlog");
} else {
window.open("itms-apps://apps.apple.com/app/xlog-on-chain-blogging/id6449499296");
}
}, [])
const goBack = useCallback(() => {