mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fixed undefined values and tooltips
This commit is contained in:
@@ -2,7 +2,7 @@ import React, { useState, useEffect } from 'react';
|
||||
import { Helmet } from 'react-helmet-async';
|
||||
import { Link, useNavigate, useParams } from 'react-router-dom';
|
||||
import { Tooltip } from 'react-tooltip';
|
||||
import { useAccountComment } from '@plebbit/plebbit-react-hooks';
|
||||
import { useAccount, useAccountComment } from '@plebbit/plebbit-react-hooks';
|
||||
import useGeneralStore from '../../hooks/stores/useGeneralStore';
|
||||
import { Container, NavBar, Header, Break, PostForm, BoardForm } from '../styled/Board.styled';
|
||||
import { ReplyFormLink, TopBar, BottomBar } from '../styled/Thread.styled';
|
||||
@@ -31,6 +31,7 @@ const Pending = () => {
|
||||
|
||||
const { index } = useParams();
|
||||
|
||||
const account = useAccount();
|
||||
const comment = useAccountComment({commentIndex: index});
|
||||
|
||||
const [visible] = useState(true);
|
||||
@@ -258,8 +259,12 @@ const Pending = () => {
|
||||
|
||||
<span className="poster-address">
|
||||
(u/
|
||||
<span key={`pa-${"pending"}`} className="poster-address">
|
||||
{comment.author?.address}
|
||||
<span key={`pa-${"pending"}`} className="poster-address"
|
||||
data-tooltip-id="tooltip"
|
||||
data-tooltip-content={account?.author?.address}
|
||||
data-tooltip-place="top"
|
||||
>
|
||||
{account?.author?.address.slice(0, 10) + "(...)"}
|
||||
</span>)
|
||||
</span>
|
||||
|
||||
@@ -302,8 +307,12 @@ const Pending = () => {
|
||||
|
||||
<span key={`mob-pa-${"pending"}`} className="poster-address-mobile">
|
||||
(u/
|
||||
<span key={`mob-ha-${"pending"}`} className="highlight-address-mobile">
|
||||
{comment.author?.address}
|
||||
<span key={`mob-ha-${"pending"}`} className="poster-address-mobile"
|
||||
data-tooltip-id="tooltip"
|
||||
data-tooltip-content={account?.author?.address}
|
||||
data-tooltip-place="top"
|
||||
>
|
||||
{account?.author?.address.slice(0, 10) + "(...)"}
|
||||
</span>
|
||||
)
|
||||
</span>
|
||||
|
||||
Reference in New Issue
Block a user