import Constants from "expo-constants"; import { Link } from "expo-router"; import { Text, View } from "react-native"; import { useServerStore } from "../hooks/useServerCheck"; export function GlobalFooter() { const build = Constants.expoConfig?.android?.versionCode ?? 1; const serverVersion = useServerStore((s) => s.serverVersion); const hasUpdate = serverVersion && serverVersion?.minSupportedVersionCode > build; const shouldUpdate = serverVersion && serverVersion?.versionCode > build; if (serverVersion && serverVersion?.versionCode <= build) return; return ( {hasUpdate && ( Critical updates pending, once you are completed with your task please click me for instructions to update )} {!hasUpdate && shouldUpdate && ( There is an update click me for instructions )} ); }