mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
added useParams to Pending.jsx
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
import React, { useState, useEffect } from 'react';
|
import React, { useState, useEffect } from 'react';
|
||||||
import { Link, useNavigate } from 'react-router-dom';
|
import { Link, useNavigate, useParams } from 'react-router-dom';
|
||||||
import { Tooltip } from 'react-tooltip';
|
import { Tooltip } from 'react-tooltip';
|
||||||
|
import { useAccountComment } from '@plebbit/plebbit-react-hooks';
|
||||||
import useGeneralStore from '../../hooks/stores/useGeneralStore';
|
import useGeneralStore from '../../hooks/stores/useGeneralStore';
|
||||||
import { Container, NavBar, Header, Break, PostForm, BoardForm } from '../styled/Board.styled';
|
import { Container, NavBar, Header, Break, PostForm, BoardForm } from '../styled/Board.styled';
|
||||||
import { ReplyFormLink, TopBar, BottomBar } from '../styled/Thread.styled';
|
import { ReplyFormLink, TopBar, BottomBar } from '../styled/Thread.styled';
|
||||||
@@ -20,7 +21,6 @@ const Pending = () => {
|
|||||||
const {
|
const {
|
||||||
defaultSubplebbits,
|
defaultSubplebbits,
|
||||||
isSettingsOpen, setIsSettingsOpen,
|
isSettingsOpen, setIsSettingsOpen,
|
||||||
pendingComment,
|
|
||||||
selectedAddress, setSelectedAddress,
|
selectedAddress, setSelectedAddress,
|
||||||
selectedStyle,
|
selectedStyle,
|
||||||
selectedThread,
|
selectedThread,
|
||||||
@@ -28,7 +28,9 @@ const Pending = () => {
|
|||||||
showPostFormLink
|
showPostFormLink
|
||||||
} = useGeneralStore(state => state);
|
} = useGeneralStore(state => state);
|
||||||
|
|
||||||
const comment = pendingComment;
|
const { index } = useParams();
|
||||||
|
|
||||||
|
const comment = useAccountComment({commentIndex: index});
|
||||||
|
|
||||||
const [visible] = useState(true);
|
const [visible] = useState(true);
|
||||||
const [errorMessage] = useState(null);
|
const [errorMessage] = useState(null);
|
||||||
|
|||||||
Reference in New Issue
Block a user