added catalog view

This commit is contained in:
plebbitor
2023-02-19 16:48:46 +01:00
parent e99217c239
commit 4d1fe1355b
7 changed files with 509 additions and 5 deletions
+8 -5
View File
@@ -19,7 +19,7 @@ const Board = ({ setBodyStyle }) => {
const { feed, hasMore, loadMore } = useFeed([`${selectedAddress}`], 'new');
console.log(feed);
// console.log(feed);
const tryLoadMore = async () => {
try {loadMore()}
@@ -216,7 +216,7 @@ const Board = ({ setBodyStyle }) => {
const { replyCount, replies: { pages: { topAll: { comments: nestedComments } } } } = comment;
if (replyCount > 0 && nestedComments.length > 0) {
const renderedNestedComments = renderComments(nestedComments, comment.cid);
const renderedNestedComments = renderComments(nestedComments);
return [comment, ...renderedNestedComments];
}
@@ -317,6 +317,9 @@ const Board = ({ setBodyStyle }) => {
<option value="Photon">Photon</option>
</select>
</span>
[
<Link to="/board/catalog">Catalog</Link>
]
<hr />
</TopBar>
<BoardForm selectedStyle={selectedStyle}>
@@ -331,7 +334,7 @@ const Board = ({ setBodyStyle }) => {
let counter = 1;
const thread = object;
const { replies: { pages: { topAll: { comments } } } } = object;
const renderedComments = renderComments(comments, thread.cid);
const renderedComments = renderComments(comments);
return (
<>
<div key={`t-${thread.cid}`} className="thread">
@@ -406,8 +409,8 @@ const Board = ({ setBodyStyle }) => {
<a key={`pmb-${reply.cid}`} className="post-menu-button" href={handleVoidClick} title="Post menu" data-cmd="post-menu"></a>
</div>
<blockquote key={`pm-${reply.cid}`} className="post-message">
<a class="quotelink" href={handleVoidClick}>
{`>>${counterString}`}{counterString !== '' && <br />}
<a className="quotelink" href={handleVoidClick}>
{`>>${counterString}`}{<br />}
</a>
{reply.content}
</blockquote>