fixed some bug
This commit is contained in:
@@ -5,8 +5,8 @@ import { Key, memo } from 'react';
|
|||||||
export const MessageList = memo(function MessageList({ data }: { data: any }) {
|
export const MessageList = memo(function MessageList({ data }: { data: any }) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{data.map((item: string, index: Key) => (
|
{data.map((item: { pubkey: string }, index: Key) => (
|
||||||
<UserMini key={index} pubkey={item} />
|
<UserMini key={index} pubkey={item.pubkey} />
|
||||||
))}
|
))}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ export const NoteConnector = memo(function NoteConnector() {
|
|||||||
const [relays] = useAtom(relaysAtom);
|
const [relays] = useAtom(relaysAtom);
|
||||||
const [activeAccount] = useAtom(activeAccountAtom);
|
const [activeAccount] = useAtom(activeAccountAtom);
|
||||||
|
|
||||||
const [isOnline] = useState(navigator.onLine);
|
const [isOnline] = useState(true);
|
||||||
const now = useRef(new Date());
|
const now = useRef(new Date());
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|||||||
@@ -35,7 +35,9 @@ export const UserBase = memo(function UserBase({ pubkey }: { pubkey: string }) {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="flex w-full flex-1 flex-col items-start text-start">
|
<div className="flex w-full flex-1 flex-col items-start text-start">
|
||||||
<span className="font-medium leading-tight text-zinc-200">{profile?.display_name || profile?.name}</span>
|
<span className="truncate font-medium leading-tight text-zinc-200">
|
||||||
|
{profile?.display_name || profile?.name}
|
||||||
|
</span>
|
||||||
<span className="text-sm leading-tight text-zinc-400">{truncate(pubkey, 16, ' .... ')}</span>
|
<span className="text-sm leading-tight text-zinc-400">{truncate(pubkey, 16, ' .... ')}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user