mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
add setPendingCommentIndex
This commit is contained in:
@@ -33,6 +33,7 @@ const Thread = () => {
|
||||
isSettingsOpen, setIsSettingsOpen,
|
||||
setResolveCaptchaPromise,
|
||||
pendingComment, setPendingComment,
|
||||
setPendingCommentIndex,
|
||||
selectedAddress, setSelectedAddress,
|
||||
setSelectedParentCid,
|
||||
setSelectedShortCid,
|
||||
@@ -137,7 +138,7 @@ const Thread = () => {
|
||||
|
||||
useEffect(() => {
|
||||
if (index !== undefined) {
|
||||
window.scrollTo(0, document.body.scrollHeight);
|
||||
setPendingCommentIndex(index);
|
||||
}
|
||||
}, [index]);
|
||||
|
||||
@@ -151,6 +152,10 @@ const Thread = () => {
|
||||
|
||||
const handleSubmit = async (event) => {
|
||||
event.preventDefault();
|
||||
|
||||
setTimeout(() => {
|
||||
window.scrollTo(0, document.body.scrollHeight);
|
||||
}, 100)
|
||||
|
||||
setPublishCommentOptions((prevPublishCommentOptions) => ({
|
||||
...prevPublishCommentOptions,
|
||||
|
||||
Reference in New Issue
Block a user