Check for mobile app access.

This commit is contained in:
Patrick Fic
2022-01-12 15:21:31 -08:00
parent 30ae80c62c
commit 667ddc25d1
8 changed files with 63 additions and 20 deletions

View File

@@ -1,10 +1,10 @@
import React from "react";
import { useTranslation } from "react-i18next";
import { ActivityIndicator, Image, StyleSheet, View } from "react-native";
import { Title } from "react-native-paper";
import { Title, Subheading } from "react-native-paper";
import Logo from "../../assets/logo192.png";
export default function ScreenSplash() {
export default function ScreenSplash({ noAccess }) {
const { t } = useTranslation();
return (
<View style={[localStyles.container]}>
@@ -13,7 +13,15 @@ export default function ScreenSplash() {
<Title>{t("app.title")}</Title>
</View>
<ActivityIndicator color="dodgerblue" size="large" />
{noAccess ? (
<View style={[localStyles.logoContainer]}>
<Subheading style={{ textAlign: "center" }}>
{t("app.nomobileaccess")}
</Subheading>
</View>
) : (
<ActivityIndicator color="dodgerblue" size="large" />
)}
</View>
);
}