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;
|
overflow-x: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.error {
|
||||||
|
color: red;
|
||||||
|
padding: 5px;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
.thread {
|
.thread {
|
||||||
clear: both;
|
clear: both;
|
||||||
}
|
}
|
||||||
@@ -508,6 +514,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: 640px) {
|
@media (min-width: 640px) {
|
||||||
|
.error {
|
||||||
|
padding-left: 0;
|
||||||
|
padding-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.replyQuotePreview {
|
.replyQuotePreview {
|
||||||
padding-right: 7px;
|
padding-right: 7px;
|
||||||
padding-left: 2px;
|
padding-left: 2px;
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ const PostPage = () => {
|
|||||||
post = comment;
|
post = comment;
|
||||||
}
|
}
|
||||||
|
|
||||||
const { deleted, locked, removed } = post || {};
|
const { error, deleted, locked, removed, replyCount } = post || {};
|
||||||
const isThreadClosed = deleted || locked || removed;
|
const isThreadClosed = deleted || locked || removed;
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -92,6 +92,9 @@ const PostPage = () => {
|
|||||||
<div className={styles.content}>
|
<div className={styles.content}>
|
||||||
{isInSettigsView && <SettingsModal />}
|
{isInSettigsView && <SettingsModal />}
|
||||||
{showReplyModal && activeCid && <ReplyModal closeModal={closeModal} parentCid={activeCid} scrollY={scrollY} />}
|
{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 ? (
|
{isInDescriptionView ? (
|
||||||
<SubplebbitDescription
|
<SubplebbitDescription
|
||||||
avatarUrl={suggested?.avatarUrl}
|
avatarUrl={suggested?.avatarUrl}
|
||||||
|
|||||||
Reference in New Issue
Block a user