refactor: comment
This commit is contained in:
@@ -5,7 +5,7 @@ import { useState } from "react";
|
|||||||
import { api } from "@/trpc/react";
|
import { api } from "@/trpc/react";
|
||||||
|
|
||||||
export function LatestPost() {
|
export function LatestPost() {
|
||||||
const [latestPost] = api.post.getLatest.useSuspenseQuery();
|
// const { data: latestPost } = api.post.getLatest.useQuery();
|
||||||
|
|
||||||
const utils = api.useUtils();
|
const utils = api.useUtils();
|
||||||
const [name, setName] = useState("");
|
const [name, setName] = useState("");
|
||||||
@@ -18,11 +18,11 @@ export function LatestPost() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="w-full max-w-xs">
|
<div className="w-full max-w-xs">
|
||||||
{latestPost ? (
|
{/* {latestPost ? (
|
||||||
<p className="truncate">Your most recent post: {latestPost.name}</p>
|
<p className="truncate">Your most recent post: {latestPost.name}</p>
|
||||||
) : (
|
) : (
|
||||||
<p>You have no posts yet.</p>
|
<p>You have no posts yet.</p>
|
||||||
)}
|
)} */}
|
||||||
<form
|
<form
|
||||||
onSubmit={(e) => {
|
onSubmit={(e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|||||||
Reference in New Issue
Block a user