Files
5chan/src/components/VerifiedAuthor.jsx
T

12 lines
384 B
React
Raw Normal View History

2023-09-09 11:02:23 +02:00
import React from 'react';
2023-09-16 21:40:23 +02:00
import { useComment, useAuthorAddress } from '@plebbit/plebbit-react-hooks';
2023-07-08 14:37:08 +02:00
function VerifiedAuthor({ commentCid, children }) {
2023-09-16 21:40:23 +02:00
const comment = useComment({ commentCid });
const { authorAddress, shortAuthorAddress } = useAuthorAddress({ comment });
2023-07-08 14:37:08 +02:00
2023-09-16 21:40:23 +02:00
return children({ authorAddress, shortAuthorAddress });
2023-07-08 14:37:08 +02:00
}
2023-09-16 21:40:23 +02:00
export default React.memo(VerifiedAuthor);