mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
added instant pending reply
This commit is contained in:
@@ -2,7 +2,7 @@ import React, { useState, useEffect, useRef } from 'react';
|
|||||||
import { Helmet } from 'react-helmet-async';
|
import { Helmet } from 'react-helmet-async';
|
||||||
import { Link, useNavigate, useParams } from 'react-router-dom';
|
import { Link, useNavigate, useParams } from 'react-router-dom';
|
||||||
import { Tooltip } from 'react-tooltip';
|
import { Tooltip } from 'react-tooltip';
|
||||||
import { useAccount, useComment, usePublishComment } from '@plebbit/plebbit-react-hooks';
|
import { useAccount, useAccountComment, useComment, usePublishComment } from '@plebbit/plebbit-react-hooks';
|
||||||
import { debounce } from 'lodash';
|
import { debounce } from 'lodash';
|
||||||
import useGeneralStore from '../../hooks/stores/useGeneralStore';
|
import useGeneralStore from '../../hooks/stores/useGeneralStore';
|
||||||
import { Container, NavBar, Header, Break, PostForm, PostFormTable } from '../styled/Board.styled';
|
import { Container, NavBar, Header, Break, PostForm, PostFormTable } from '../styled/Board.styled';
|
||||||
@@ -32,8 +32,8 @@ const Thread = () => {
|
|||||||
setIsCaptchaOpen,
|
setIsCaptchaOpen,
|
||||||
isSettingsOpen, setIsSettingsOpen,
|
isSettingsOpen, setIsSettingsOpen,
|
||||||
setResolveCaptchaPromise,
|
setResolveCaptchaPromise,
|
||||||
pendingComment, setPendingComment,
|
setPendingComment,
|
||||||
setPendingCommentIndex,
|
pendingCommentIndex, setPendingCommentIndex,
|
||||||
selectedAddress, setSelectedAddress,
|
selectedAddress, setSelectedAddress,
|
||||||
setSelectedParentCid,
|
setSelectedParentCid,
|
||||||
setSelectedShortCid,
|
setSelectedShortCid,
|
||||||
@@ -63,6 +63,8 @@ const Thread = () => {
|
|||||||
const [errorMessage, setErrorMessage] = useState(null);
|
const [errorMessage, setErrorMessage] = useState(null);
|
||||||
useError(errorMessage, [errorMessage]);
|
useError(errorMessage, [errorMessage]);
|
||||||
|
|
||||||
|
const pendingComment = useAccountComment({commentIndex: pendingCommentIndex});
|
||||||
|
|
||||||
const renderedComments = renderThreadComments(comment, pendingComment);
|
const renderedComments = renderThreadComments(comment, pendingComment);
|
||||||
|
|
||||||
// temporary title from JSON, gets subplebbitAddress and threadCid from URL
|
// temporary title from JSON, gets subplebbitAddress and threadCid from URL
|
||||||
|
|||||||
Reference in New Issue
Block a user