From dd911a7591984d1ca3e7a4ad0bf5327574f71aca Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Sat, 13 Jul 2024 00:04:19 -0600 Subject: [PATCH] refactor: add posts --- t3/src/app/_components/post.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/t3/src/app/_components/post.tsx b/t3/src/app/_components/post.tsx index 1b5eec2..3cfc911 100644 --- a/t3/src/app/_components/post.tsx +++ b/t3/src/app/_components/post.tsx @@ -5,7 +5,7 @@ import { useState } from "react"; import { api } from "@/trpc/react"; export function LatestPost() { - // const { data: latestPost } = api.post.getLatest.useQuery(); + const { data: latestPost } = api.post.getLatest.useQuery(); const utils = api.useUtils(); const [name, setName] = useState(""); @@ -18,11 +18,11 @@ export function LatestPost() { return (
- {/* {latestPost ? ( + {latestPost ? (

Your most recent post: {latestPost.name}

) : (

You have no posts yet.

- )} */} + )}
{ e.preventDefault();