mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
revert test
This commit is contained in:
@@ -7,7 +7,7 @@ import ImageBanner from '../ImageBanner';
|
||||
import PostLoader from '../PostLoader';
|
||||
import ReplyModal from '../ReplyModal';
|
||||
import SettingsModal from '../SettingsModal';
|
||||
import { useFeed, usePublishComment } from '@plebbit/plebbit-react-hooks';
|
||||
import { useFeed, useAccountsActions } from '@plebbit/plebbit-react-hooks';
|
||||
import InfiniteScroll from 'react-infinite-scroller';
|
||||
import { Tooltip } from 'react-tooltip';
|
||||
import handleStyleChange from '../../utils/handleStyleChange';
|
||||
@@ -34,7 +34,7 @@ const Board = () => {
|
||||
const [name, setName] = useState('');
|
||||
const [subject, setSubject] = useState('');
|
||||
const [comment, setComment] = useState('');
|
||||
const { publishComment } = usePublishComment();
|
||||
const { publishComment } = useAccountsActions();
|
||||
const [isCaptchaOpen, setIsCaptchaOpen] = useState(false);
|
||||
const [isReplyOpen, setIsReplyOpen] = useState(false);
|
||||
const [captchaImage, setCaptchaImage] = useState('');
|
||||
@@ -42,7 +42,7 @@ const Board = () => {
|
||||
const [prevScrollPos, setPrevScrollPos] = useState(0);
|
||||
const [visible, setVisible] = useState(true);
|
||||
const [endIndex, setEndIndex] = useState(2);
|
||||
const { feed, hasMore, loadMore } = useFeed({subplebbitAddresses: ['test2'], sortType: 'new'});
|
||||
const { feed, hasMore, loadMore } = useFeed([`${selectedAddress}`], 'new');
|
||||
const [selectedFeed, setSelectedFeed] = useState(feed);
|
||||
const renderedFeed = selectedFeed.slice(0, endIndex);
|
||||
const { subplebbitAddress } = useParams();
|
||||
|
||||
@@ -4,7 +4,7 @@ import useAppStore from '../../useAppStore';
|
||||
import { Container, NavBar, Header, Break, PostForm, PostFormLink, PostFormTable } from './styles/Board.styled';
|
||||
import { TopBar } from './styles/Thread.styled';
|
||||
import { Threads } from './styles/Catalog.styled';
|
||||
import { useFeed, usePublishComment } from '@plebbit/plebbit-react-hooks';
|
||||
import { useFeed, useAccountsActions } from '@plebbit/plebbit-react-hooks';
|
||||
import ImageBanner from '../ImageBanner';
|
||||
import CaptchaModal from '../CaptchaModal';
|
||||
import CatalogLoader from '../CatalogLoader';
|
||||
@@ -32,13 +32,13 @@ const Catalog = () => {
|
||||
const [name, setName] = useState('');
|
||||
const [subject, setSubject] = useState('');
|
||||
const [comment, setComment] = useState('');
|
||||
const { publishComment } = usePublishComment();
|
||||
const { publishComment } = useAccountsActions();
|
||||
const [isCaptchaOpen, setIsCaptchaOpen] = useState(false);
|
||||
const [captchaImage, setCaptchaImage] = useState('');
|
||||
const navigate = useNavigate();
|
||||
const [prevScrollPos, setPrevScrollPos] = useState(0);
|
||||
const [visible, setVisible] = useState(true);
|
||||
const { feed, hasMore, loadMore } = useFeed({subplebbitAddresses: [`thisIsATest`], sortType: 'new'});
|
||||
const { feed, hasMore, loadMore } = useFeed([`${selectedAddress}`], 'new');
|
||||
const { subplebbitAddress } = useParams();
|
||||
const handleClickForm = useClickForm();
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ const Home = () => {
|
||||
{defaultSubplebbits.map(subplebbit => (
|
||||
<div className="board" key={subplebbit.address}>
|
||||
<div className="board-title">{subplebbit.title}</div>
|
||||
<Link to={`/test2`} onClick={() => {
|
||||
<Link to={`/${subplebbit.address}`} onClick={() => {
|
||||
handleClick(subplebbit.title, subplebbit.address);
|
||||
}} >
|
||||
<img alt="board logo" src="/assets/plebchan.png" />
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Link, useNavigate, useParams } from 'react-router-dom';
|
||||
import useAppStore from '../../useAppStore';
|
||||
import { Container, NavBar, Header, Break, PostForm, PostFormTable, BoardForm } from './styles/Board.styled';
|
||||
import { ReplyFormLink, TopBar, BottomBar } from './styles/Thread.styled';
|
||||
import { useComment, usePublishComment } from '@plebbit/plebbit-react-hooks';
|
||||
import { useComment, useAccountsActions } from '@plebbit/plebbit-react-hooks';
|
||||
import { Tooltip } from 'react-tooltip';
|
||||
import CaptchaModal from '../CaptchaModal';
|
||||
import ImageBanner from '../ImageBanner';
|
||||
@@ -35,21 +35,17 @@ const Thread = () => {
|
||||
const [name, setName] = useState('');
|
||||
const [subject, setSubject] = useState('');
|
||||
const [commentContent, setCommentContent] = useState('');
|
||||
const { publishComment } = usePublishComment();
|
||||
const { publishComment } = useAccountsActions();
|
||||
const [isCaptchaOpen, setIsCaptchaOpen] = useState(false);
|
||||
const [isReplyOpen, setIsReplyOpen] = useState(false);
|
||||
const [captchaImage, setCaptchaImage] = useState('');
|
||||
const navigate = useNavigate();
|
||||
const [prevScrollPos, setPrevScrollPos] = useState(0);
|
||||
const [visible, setVisible] = useState(true);
|
||||
const comment = useComment({selectedThread});
|
||||
const comment = useComment(selectedThread);
|
||||
const { subplebbitAddress, threadCid } = useParams();
|
||||
const handleClickForm = useClickForm();
|
||||
|
||||
useEffect(() => {
|
||||
console.log(comment);
|
||||
}, [comment]);
|
||||
|
||||
|
||||
// temporary title from JSON, gets subplebbitAddress and threadCid from URL
|
||||
useEffect(() => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const getDate = (commentTimestamp) => {
|
||||
const locale = Intl.DateTimeFormat().resolvedOptions().locale;
|
||||
const string = /*new Intl.DateTimeFormat(locale, {
|
||||
const string = new Intl.DateTimeFormat(locale, {
|
||||
hour12: false,
|
||||
year: '2-digit',
|
||||
month: '2-digit',
|
||||
@@ -9,7 +9,7 @@ const getDate = (commentTimestamp) => {
|
||||
hour: '2-digit',
|
||||
minute: '2-digit',
|
||||
second: '2-digit'
|
||||
}).format(new Date(commentTimestamp * 1000))*/ "";
|
||||
}).format(new Date(commentTimestamp * 1000));
|
||||
if (locale.startsWith('ar')) {
|
||||
return string
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user