mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix bugs
This commit is contained in:
@@ -44,7 +44,6 @@
|
|||||||
background-color: var(--topbar-mobile-background-color);
|
background-color: var(--topbar-mobile-background-color);
|
||||||
border-bottom: var(--topbar-mobile-border-bottom);
|
border-bottom: var(--topbar-mobile-border-bottom);
|
||||||
font-size: var(--topbar-mobile-font-size);
|
font-size: var(--topbar-mobile-font-size);
|
||||||
color: var(--topbar-mobile-button-text-color);
|
|
||||||
position: fixed;
|
position: fixed;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
z-index: 3;
|
z-index: 3;
|
||||||
@@ -54,7 +53,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.boardNavMobile .pageJump a, .boardNavMobile .pageJump span {
|
.boardNavMobile .pageJump a, .boardNavMobile .pageJump span {
|
||||||
color: var(--topbar-mobile-button-color);
|
color: var(--topbar-mobile-button-text-color);
|
||||||
text-decoration: var(--button-text-decoration-mobile);
|
text-decoration: var(--button-text-decoration-mobile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,14 @@
|
|||||||
|
import { useEffect } from 'react';
|
||||||
import { HashLink } from 'react-router-hash-link';
|
import { HashLink } from 'react-router-hash-link';
|
||||||
import { Footer, HomeLogo } from '../home';
|
import { Footer, HomeLogo } from '../home';
|
||||||
import styles from './faq.module.css';
|
import styles from './faq.module.css';
|
||||||
|
|
||||||
const FAQ = () => {
|
const FAQ = () => {
|
||||||
|
useEffect(() => {
|
||||||
|
window.scrollTo(0, 0);
|
||||||
|
document.title = 'FAQ - plebchan';
|
||||||
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.wrapper}>
|
<div className={styles.wrapper}>
|
||||||
<div className={styles.content}>
|
<div className={styles.content}>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useEffect } from 'react';
|
import { useEffect } from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { Role, useComment, useEditedComment, useSubplebbit } from '@plebbit/plebbit-react-hooks';
|
import { Comment, Role, useComment, useEditedComment, useSubplebbit } from '@plebbit/plebbit-react-hooks';
|
||||||
import { useLocation, useParams } from 'react-router-dom';
|
import { useLocation, useParams } from 'react-router-dom';
|
||||||
import { isDescriptionView, isRulesView, isSettingsView } from '../../lib/utils/view-utils';
|
import { isDescriptionView, isRulesView, isSettingsView } from '../../lib/utils/view-utils';
|
||||||
import useIsMobile from '../../hooks/use-is-mobile';
|
import useIsMobile from '../../hooks/use-is-mobile';
|
||||||
@@ -68,7 +68,7 @@ const PostPage = () => {
|
|||||||
|
|
||||||
// if the comment is a reply, return the post comment instead, then the reply will be highlighted in the thread
|
// if the comment is a reply, return the post comment instead, then the reply will be highlighted in the thread
|
||||||
const postComment = useComment({ commentCid: comment?.postCid });
|
const postComment = useComment({ commentCid: comment?.postCid });
|
||||||
let post;
|
let post: Comment;
|
||||||
if (comment.parentCid) {
|
if (comment.parentCid) {
|
||||||
post = postComment;
|
post = postComment;
|
||||||
} else {
|
} else {
|
||||||
@@ -82,6 +82,12 @@ const PostPage = () => {
|
|||||||
window.scrollTo(0, 0);
|
window.scrollTo(0, 0);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
const boardTitle = title ? title : shortAddress || subplebbitAddress;
|
||||||
|
const postTitle = post?.title?.slice(0, 30) || post?.content?.slice(0, 30);
|
||||||
|
document.title = (postTitle ? postTitle.trim() + '... - ' : '') + boardTitle + ' - plebchan';
|
||||||
|
}, [title, shortAddress, subplebbitAddress, post?.title, post?.content]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.content}>
|
<div className={styles.content}>
|
||||||
{isInSettigsView && <SettingsModal />}
|
{isInSettigsView && <SettingsModal />}
|
||||||
|
|||||||
Reference in New Issue
Block a user