import { useQuery } from "@tanstack/react-query"; import { View, Text, ScrollView } from "react-native"; import { Container } from "@/components/container"; {{#if (eq api "orpc")}} import { orpc } from "@/utils/orpc"; {{/if}} {{#if (eq api "trpc")}} import { trpc } from "@/utils/trpc"; {{/if}} export default function Home() { {{#if (eq api "orpc")}} const healthCheck = useQuery(orpc.healthCheck.queryOptions()); {{/if}} {{#if (eq api "trpc")}} const healthCheck = useQuery(trpc.healthCheck.queryOptions()); {{/if}} return ( BETTER T STACK API Status {healthCheck.isLoading ? "Checking..." : healthCheck.data ? "Connected" : "Disconnected"} ); }