【发布时间】:2022-06-22 17:21:21
【问题描述】:
{!post.isSearch && (
<p className="text-sm">
{post.postType == "post"
? post.content
: truncate(post.content, { length: maxChars })}
</p>
)}
{post.postType !== "post" && post.content.length > maxChars && (
<NextLink href={`/post/${post.id}`}>
<a className="text-ua-red text-left text-xs cursor-pointer
hover:underline">
Read more...
</a>
</NextLink>
)}
。我正在使用 next js 从 firebase 获取数据。数据呈现,但由于某种原因我的代码不起作用阅读更多的东西不起作用
【问题讨论】:
-
“阅读更多内容不起作用” - 你能更具体一点吗?什么不起作用?它没有链接到预期的页面吗?会发生什么?
-
你能用stackblitz.com做一个演示吗?