import { SafeAreaView, Text, View } from "react-native"; import { Stack, useGlobalSearchParams } from "expo-router"; import { useQuery } from "@tanstack/react-query"; import { trpc } from "~/utils/api"; export default function Post() { const { id } = useGlobalSearchParams<{ id: string }>(); const { data } = useQuery(trpc.post.byId.queryOptions({ id })); if (!data) return null; return ( {data.title} {data.content} ); }