Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
Block Explorer UI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hive
Block Explorer UI
Commits
67b33a98
Commit
67b33a98
authored
3 months ago
by
Lukas
Browse files
Options
Downloads
Patches
Plain Diff
Add post comments to post page content
parent
c3be8425
No related branches found
No related tags found
1 merge request
!510
Lbudginas/#411 add post comments
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
components/post/PostPageContent.tsx
+9
-26
9 additions, 26 deletions
components/post/PostPageContent.tsx
with
9 additions
and
26 deletions
components/post/PostPageContent.tsx
+
9
−
26
View file @
67b33a98
import
{
useState
}
from
"
react
"
;
import
{
useRouter
}
from
"
next/router
"
;
import
Link
from
"
next/link
"
;
import
usePostContent
from
"
@/hooks/api/postPage/usePostContent
"
;
import
PostContent
Card
from
"
./
PostContent
Card
"
;
import
Post
PropertiesTable
from
"
./PostPropertiesTable
"
;
import
VoteDetailsTable
from
"
./VoteDetailsTable
"
;
import
use
PostContent
Replies
from
"
@/hooks/api/postPage/use
PostContent
Replies
"
;
import
Post
Content
from
"
./PostContent
"
;
import
PostComments
from
"
./PostComments
"
;
const
HIVE_BLOG_URL
=
"
https://hive.blog
"
;
const
PEAKD_URL
=
"
https://peakd.com
"
;
...
...
@@ -19,13 +18,7 @@ const PostPageContent = () => {
const
path
=
router
.
asPath
;
const
{
data
}
=
usePostContent
(
accountName
,
permlink
);
const
[
isPropertiesOpen
,
setIsPropertiesOpen
]
=
useState
(
false
);
const
[
isVoteDetailsOpen
,
setIsVoteDetailsOpen
]
=
useState
(
false
);
const
handlePropertiesToggle
=
()
=>
setIsPropertiesOpen
(
!
isPropertiesOpen
);
const
handleVoteDetailsToggle
=
()
=>
setIsVoteDetailsOpen
(
!
isVoteDetailsOpen
);
const
{
data
:
postReplies
}
=
usePostContentReplies
(
accountName
,
permlink
);
if
(
!
data
)
return
;
...
...
@@ -64,23 +57,13 @@ const PostPageContent = () => {
</
Link
>
</
div
>
</
div
>
<
PostContentCard
isPropertiesOpen
=
{
isPropertiesOpen
}
isVoteDetailsOpen
=
{
isVoteDetailsOpen
}
handlePropertiesToggle
=
{
handlePropertiesToggle
}
handleVoteDetailsToggle
=
{
handleVoteDetailsToggle
}
voteDetailsLength
=
{
active_votes
.
length
??
0
}
<
PostContent
active_votes
=
{
active_votes
}
data
=
{
data
}
/>
<
PostPropertiesTable
isPropertiesOpen
=
{
isPropertiesOpen
}
data
=
{
data
}
/>
<
VoteDetailsTable
isVoteDetailsOpen
=
{
isVoteDetailsOpen
}
voteDetails
=
{
active_votes
}
/>
{
postReplies
&&
postReplies
.
length
&&
(
<
PostComments
comments
=
{
postReplies
}
/>
)
}
</
div
>
);
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment