fix eslint, styling

This commit is contained in:
Tom (plebeius.eth)
2024-06-06 20:44:53 +02:00
parent 3a6d2f16b0
commit 387ae35904
3 changed files with 8 additions and 5 deletions
@@ -185,7 +185,7 @@ const PostMessage = ({ post }: PostProps) => {
{removed ? ( {removed ? (
<span className={styles.removedContent}>({t('this_post_was_removed')})</span> <span className={styles.removedContent}>({t('this_post_was_removed')})</span>
) : deleted ? ( ) : deleted ? (
<span className={styles.removedContent}>{t('user_deleted_this_post')}</span> <span className={styles.deletedContent}>{t('user_deleted_this_post')}</span>
) : ( ) : (
<Markdown content={displayContent} spoiler={spoiler} /> <Markdown content={displayContent} spoiler={spoiler} />
)} )}
+5 -2
View File
@@ -392,12 +392,15 @@
cursor: pointer; cursor: pointer;
} }
.removedContent { .removedContent, .deletedContent {
text-transform: uppercase;
font-weight: 700; font-weight: 700;
color: red; color: red;
} }
.removedContent {
text-transform: uppercase;
}
.backlink, .backlinkHash { .backlink, .backlinkHash {
font-size: 0.8em; font-size: 0.8em;
} }
+2 -2
View File
@@ -10,9 +10,9 @@ const usePopularPosts = (subplebbits: Subplebbit[]) => {
const allPosts: Comment[] = []; const allPosts: Comment[] = [];
let postsPerSub = 1; let postsPerSub = 1;
if (subplebbits.length == 2) { if (subplebbits.length === 2) {
postsPerSub = 4; postsPerSub = 4;
} else if (subplebbits.length == 3) { } else if (subplebbits.length === 3) {
postsPerSub = 3; postsPerSub = 3;
} else if (subplebbits.length >= 4 && subplebbits.length < 8) { } else if (subplebbits.length >= 4 && subplebbits.length < 8) {
postsPerSub = 2; postsPerSub = 2;