mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
feat(post page): add error line above post
This commit is contained in:
@@ -3,6 +3,12 @@
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.error {
|
||||
color: red;
|
||||
padding: 5px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.thread {
|
||||
clear: both;
|
||||
}
|
||||
@@ -508,6 +514,11 @@
|
||||
}
|
||||
|
||||
@media (min-width: 640px) {
|
||||
.error {
|
||||
padding-left: 0;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.replyQuotePreview {
|
||||
padding-right: 7px;
|
||||
padding-left: 2px;
|
||||
|
||||
@@ -75,7 +75,7 @@ const PostPage = () => {
|
||||
post = comment;
|
||||
}
|
||||
|
||||
const { deleted, locked, removed } = post || {};
|
||||
const { error, deleted, locked, removed, replyCount } = post || {};
|
||||
const isThreadClosed = deleted || locked || removed;
|
||||
|
||||
useEffect(() => {
|
||||
@@ -92,6 +92,9 @@ const PostPage = () => {
|
||||
<div className={styles.content}>
|
||||
{isInSettigsView && <SettingsModal />}
|
||||
{showReplyModal && activeCid && <ReplyModal closeModal={closeModal} parentCid={activeCid} scrollY={scrollY} />}
|
||||
{/* TODO: remove this replyCount error once api supports scrolling replies pages */}
|
||||
{replyCount > 60 && <span className={styles.error}>Error: this thread has too many replies, some of them cannot be displayed right now.</span>}
|
||||
{error && <span className={styles.error}>Error: {error.message}</span>}
|
||||
{isInDescriptionView ? (
|
||||
<SubplebbitDescription
|
||||
avatarUrl={suggested?.avatarUrl}
|
||||
|
||||
Reference in New Issue
Block a user